﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    mc:Ignorable="d"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008">

    <SolidColorBrush x:Key="OutsideFontColor"
                     Color="#FFFFFFFF" />

    <LinearGradientBrush x:Key="NormalBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF"
                      Offset="0" />
        <GradientStop Color="#FFA4ADBB"
                      Offset="0.521" />
        <GradientStop Color="#FFD7E0EA"
                      Offset="0.194" />
        <GradientStop Color="#FFBAC1CF"
                      Offset="0.811" />
        <GradientStop Color="#FFBCC5D5"
                      Offset="0.507" />
        <GradientStop Color="#FFE3E4E6"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="NormalBorderBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="#FF8B8B8B" />
        <GradientStop Color="#FFADADAD"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="NormalHighlightBrush"
                     Color="#FFFFFFFF" />
    <LinearGradientBrush x:Key="MouseOverBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF"
                      Offset="0" />
        <GradientStop Color="#FFFEF3B5"
                      Offset="0.318" />
        <GradientStop Color="#FFFFEB70"
                      Offset="0.488" />
        <GradientStop Color="#FFFFD02E"
                      Offset="0.502" />
        <GradientStop Color="#FFFFD932"
                      Offset="0.834" />
        <GradientStop Color="#FFFFF48B"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MouseOverBorderBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFEEE8CF"
                      Offset="0" />
        <GradientStop Color="#FFC4AF8C"
                      Offset="0.536" />
        <GradientStop Color="#FFDCD1BF"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MouseOverHighlightBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFB"
                      Offset="0" />
        <GradientStop Color="#FFFEF3B5"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="PressedBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFC3BCAE"
                      Offset="0" />
        <GradientStop Color="#FFFDCE9D"
                      Offset="0.046" />
        <GradientStop Color="#FFFFA35B"
                      Offset="0.452" />
        <GradientStop Color="#FFFF8A2C"
                      Offset="0.461" />
        <GradientStop Color="#FFFF9F30"
                      Offset="0.724" />
        <GradientStop Color="#FFFFC472"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="PressedBorderBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FF8E8165"
                      Offset="0" />
        <GradientStop Color="#FFC3BCAE"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="PressedHighlightBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF"
                      Offset="0.665" />
        <GradientStop Color="#FFC3BCAE"
                      Offset="0" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="DisabledBackgroundBrush"
                     Color="#A5FFFFFF" />
    <SolidColorBrush x:Key="DisabledBorderBrush"
                     Color="#66FFFFFF" />
    <SolidColorBrush x:Key="FocusBrush"
                     Color="#FFE99862" />

    <LinearGradientBrush x:Key="ControlBackgroundBrush"
                         EndPoint="1.204,0.5"
                         StartPoint="0.056,0.5">
        <GradientStop Color="#FFFFFFFF"
                      Offset="0" />
        <GradientStop Color="#FFD4D7DB"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlBorderBrush"
                     Color="#FFB1703C" />

    <SolidColorBrush x:Key="GlyphBrush"
                     Color="#FF527DB5" />

    <!-- CheckBox Brushes -->

    <SolidColorBrush x:Key="CheckBoxBackgroundBrush"
                     Color="#FFF4F4F4" />
    <SolidColorBrush x:Key="CheckBoxBorderBrush"
                     Color="#FF868686" />
    <SolidColorBrush x:Key="CheckBoxInnerBoxBackgroundBrush"
                     Color="#FFCACFD5" />
    <LinearGradientBrush x:Key="CheckBoxInnerBoxBorderBrush"
                         EndPoint="-0.007,-0.012"
                         StartPoint="0.915,0.92">
        <GradientStop Color="#FFE4E5E9" />
        <GradientStop Color="#FFA2ACB9"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="CheckBoxBackgroundFillBrush"
                     Color="#FFDEEAFA" />
    <SolidColorBrush x:Key="CheckBoxMouseOverBrush"
                     Color="#FFFCE7AF" />
    <LinearGradientBrush x:Key="CheckBoxPressBorderBrush"
                         EndPoint="0.055,0.119"
                         StartPoint="0.886,0.808">
        <GradientStop Color="#FFF4D9BE" />
        <GradientStop Color="#FFF28A27"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="CheckBoxInnerBoxGradientBrush"
                         StartPoint="0.238,0.228"
                         EndPoint="0.752,0.749">
        <GradientStop Color="#00F6F6F6"
                      Offset="0.254" />
        <GradientStop Color="#53F8F8F8"
                      Offset="0.54" />
        <GradientStop Color="#BFFFFFFF"
                      Offset="0.996" />
    </LinearGradientBrush>

    <!-- RadioButton Brushes -->

    <SolidColorBrush x:Key="RadioButtonBackgroundBrush"
                     Color="#FFEDEDEE" />
    <SolidColorBrush x:Key="RadioButtonBorderBrush"
                     Color="#FF597AA5" />
    <LinearGradientBrush x:Key="RadioButtonInnerCircleBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFC8CDD2" />
        <GradientStop Color="#FFF2F2F2"
                      Offset="0.531" />
        <GradientStop Color="#FFF5F5F5"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadioButtonInnerCircleBorderBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFB3B8BD"
                      Offset="0.004" />
        <GradientStop Color="#FFE0E0E0"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadioButtonMouseOverBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFE3DBA9" />
        <GradientStop Color="#FFFEF5DD"
                      Offset="0.531" />
        <GradientStop Color="#FFFEF5DD"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadioButtonMouseOverBorderBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFE3CF87"
                      Offset="0.004" />
        <GradientStop Color="#FFFCF0D3"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadioButtonPressBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFC8CDD2" />
        <GradientStop Color="#FFF2F2F2"
                      Offset="0.531" />
        <GradientStop Color="#FFF5F5F5"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadioButtonPressBorderBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFAC773F"
                      Offset="0.004" />
        <GradientStop Color="#FFC8B5A3"
                      Offset="0.987" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadioButtonCheckIconBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFFDDC8B"
                      Offset="0.013" />
        <GradientStop Color="#FFFDDC8B"
                      Offset="0.188" />
        <GradientStop Color="#FFF9952F"
                      Offset="0.491" />
        <GradientStop Color="#FFF9954A"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RadioButtonCheckIconBorderBrush"
                     Color="#FFDA8229" />

    <!-- ScrollBar RepeatButtonBrushes -->

    <LinearGradientBrush x:Key="ScrollBarRepeatButtonBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="#FFF1F6FE"
                      Offset="0.5" />
        <GradientStop Color="#FFC7D9F1"
                      Offset="0.513" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ScrollBarRepeatButtonBorderBrush"
                     Color="#FF8C97A5" />
    <LinearGradientBrush x:Key="ScrollBarRepeatButtonPressedBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="#FFF1F6FE"
                      Offset="0.5" />
        <GradientStop Color="#FFD1D6DD"
                      Offset="0.513" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ScrollBarRepeatButtonPressedBorderBrush"
                     Color="#FF19598A" />


    <!-- ScrollBar ThumbBrushes -->

    <LinearGradientBrush x:Key="ScrollBarThumbBrush"
                         EndPoint="-0.062,0.5"
                         StartPoint="1.062,0.5">
        <GradientStop Color="#FFD1DBE6"
                      Offset="0" />
        <GradientStop Color="#FFD1DAE4"
                      Offset="0.5" />
        <GradientStop Color="#FFE6E9F0"
                      Offset="0.513" />
        <GradientStop Color="#FFE8E9E9"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ScrollBarThumbBorderBrush"
                     Color="#FF606F94" />
    <LinearGradientBrush x:Key="ScrollBarThumbMouseOverBrush"
                         EndPoint="-0.062,0.5"
                         StartPoint="1.062,0.5">
        <GradientStop Color="#FFB4D1F7"
                      Offset="0" />
        <GradientStop Color="#FFAACBF6"
                      Offset="0.5" />
        <GradientStop Color="#FFCADFFA"
                      Offset="0.513" />
        <GradientStop Color="#FFBED0E8"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ScrollBarThumbMouseOverBorderBrush"
                     Color="#FF3C6EB0" />
    <LinearGradientBrush x:Key="ScrollBarThumbPressedBrush"
                         EndPoint="-0.062,0.5"
                         StartPoint="1.062,0.5">
        <GradientStop Color="#FFB4D1F7"
                      Offset="0" />
        <GradientStop Color="#FF6EA6F0"
                      Offset="0.5" />
        <GradientStop Color="#FFA4C7F6"
                      Offset="0.513" />
        <GradientStop Color="#FF9CBBE5"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ScrollBarThumbPressedBorderBrush"
                     Color="#FF17498A" />

    <!-- ListItem Brushes -->

    <LinearGradientBrush x:Key="ListItemSelectedBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF"
                      Offset="0.046" />
        <GradientStop Color="#FFD7E0EA"
                      Offset="0.194" />
        <GradientStop Color="#FFBCC5D5"
                      Offset="0.507" />
        <GradientStop Color="#FFA4ADBB"
                      Offset="0.521" />
        <GradientStop Color="#FFBAC1CF"
                      Offset="0.811" />
        <GradientStop Color="#FFE3E4E6"
                      Offset="0.982" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ListItemSelectedBorderBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="#FF8B8B8B" />
        <GradientStop Color="#FFADADAD"
                      Offset="1" />
    </LinearGradientBrush>

    <!-- Expander ToggleButton Brushes -->

    <LinearGradientBrush x:Key="ExpanderToggleButtonBrush"
                         EndPoint="0.293,0.43"
                         StartPoint="0.742,0.43">
        <GradientStop Color="#FFDDE0E3" />
        <GradientStop Color="#FFEFF0F1"
                      Offset="0.53" />
        <GradientStop Color="#FFDDE0E3"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ExpanderToggleButtonBottomBrush"
                     Color="#FFC7CBD1" />
    <LinearGradientBrush x:Key="ExpanderToggleButtonHoverBrush"
                         EndPoint="0.667,0.528"
                         StartPoint="0.266,0.528">
        <GradientStop Color="#FFE8EAEC" />
        <GradientStop Color="#FFFEFEFE"
                      Offset="0.366" />
        <GradientStop Color="#FFFEFEFE"
                      Offset="0.732" />
        <GradientStop Color="#FFE8EAEC"
                      Offset="1" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="ExpanderToggleArrow2Stroke"
                     Color="#FF567DB1" />
    <SolidColorBrush x:Key="ExpanderToggleArrowStroke"
                     Color="#FF567DB1" />

    <!-- ProgressBar Brushes -->

    <LinearGradientBrush x:Key="ProgressBarIndicatorBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFC3BCAE"
                      Offset="0" />
        <GradientStop Color="#FFFDCE9D"
                      Offset="0.041" />
        <GradientStop Color="#FFFFA35B"
                      Offset="0.507" />
        <GradientStop Color="#FFFF8A2C"
                      Offset="0.516" />
        <GradientStop Color="#FFFF9F30"
                      Offset="0.724" />
        <GradientStop Color="#FFFFC472"
                      Offset="1" />
    </LinearGradientBrush>

    <!-- TabControlBrushes -->

    <SolidColorBrush x:Key="TabControlHeaderBrush"
                     Color="#FF535353" />
    <SolidColorBrush x:Key="TabControlContentBrush"
                     Color="#FFD5D8DD" />
    <SolidColorBrush x:Key="TabControlContentBorderBrush"
                     Color="#FFBEBEBE" />

    <!-- TabItemBrushes -->

    <RadialGradientBrush x:Key="TabItemHoverBrush"
                         GradientOrigin="0.503,1.06">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <ScaleTransform CenterX="0.5"
                                CenterY="0.5"
                                ScaleX="2.713"
                                ScaleY="2.147" />
                <SkewTransform CenterX="0.5"
                               CenterY="0.5" />
                <RotateTransform CenterX="0.5"
                                 CenterY="0.5" />
                <TranslateTransform X="-0.012"
                                    Y="-0.134" />
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Color="#FFEBC227"
                      Offset="0.263" />
        <GradientStop Color="#00726C5E"
                      Offset="0.513" />
        <GradientStop Color="#FF969695"
                      Offset="0.683" />
    </RadialGradientBrush>
    <LinearGradientBrush x:Key="TabItemHoverBorderBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#00FFFFFF"
                      Offset="0" />
        <GradientStop Color="#FFBEBEBE"
                      Offset="0.679" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TabItemHoverHighlightBrush"
                     Color="#FF9FBCF0" />
    <LinearGradientBrush x:Key="TabItemSelectedBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFF1F1F2"
                      Offset="0.326" />
        <GradientStop Color="#FFD5D9DE"
                      Offset="1.0" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TabItemSelectedBorderBrush"
                     Color="#FFF3F8FF" />
    <LinearGradientBrush x:Key="TabItemBorderTopBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,-0.5">
        <GradientStop Color="#FFECF9FA"
                      Offset="0" />
        <GradientStop Color="#FFC1F7FC"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="TabItemHighlightTopBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFF3F8FF"
                      Offset="0" />
        <GradientStop Color="#D8ECF8FC"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TabItemBorderTop2Brush"
                     Color="#FF9ABBE6" />
    <LinearGradientBrush x:Key="TabItemFocusBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#99F7C53B"
                      Offset="0" />
        <GradientStop Color="#99F2B93F"
                      Offset="1" />
    </LinearGradientBrush>

    <!-- SliderThumbBrushes -->

    <SolidColorBrush x:Key="SliderThumbBorderBrush"
                     Color="#FF496FA2" />
    <SolidColorBrush x:Key="SliderThumbBrush"
                     Color="#FFC1C1C1" />

    <!-- SliderBrushes -->

    <LinearGradientBrush x:Key="SliderBackgroundBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FF324D70"
                      Offset="0.493" />
        <GradientStop Color="#FF6A8BB6"
                      Offset="1" />
    </LinearGradientBrush>

    <Color x:Key="BlackColor">#FF000000</Color>
    <Color x:Key="WhiteColor">#FFFFFFFF</Color>

    <SolidColorBrush x:Key="DisabledForegroundBrush"
                     Color="#888" />

    <!-- TextControlsBrushes-->
    <LinearGradientBrush x:Key="TextControlBorderBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFABAEB3" />
        <GradientStop Color="#FFE2E8EE"
                      Offset="1" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="WindowBackgroundBrush"
                     Color="#FFF" />

    <Style x:Key="NuclearButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="2"
                                   Stroke="#60000000"
                                   StrokeThickness="1"
                                   StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="{x:Type Button}"
           BasedOn="{x:Null}">
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource NuclearButtonFocusVisual}" />
        <Setter Property="Foreground"
                Value="#FF042271" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="3" />
        <Setter Property="Template"
                Value="{DynamicResource ButtonTemplate}" />
    </Style>

    <ControlTemplate x:Key="ButtonTemplate"
                     TargetType="{x:Type Button}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="BackgroundOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="1" />
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="BackgroundOver_Highlight"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0.65" />
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="BackgroundOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="BackgroundOver_Highlight"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
            </Storyboard>
            <Storyboard x:Key="PressedOn">
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="BackgroundPressed"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0.84" />
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="BackgoundPressed_Highlight"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0.65" />
            </Storyboard>
            <Storyboard x:Key="PressedOff">
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="BackgroundPressed"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="BackgoundPressed_Highlight"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
            </Storyboard>
            <Storyboard x:Key="DisabledOn">
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="DisabledVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="DisabledOverlay"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>

            </Storyboard>
            <Storyboard x:Key="FocusedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>

            </Storyboard>
        </ControlTemplate.Resources>
        <Grid x:Name="Grid">
            <Border x:Name="BackgroundNorm"
                    BorderThickness="1"
                    CornerRadius="1.75"
                    Background="{DynamicResource NormalBrush}"
                    BorderBrush="{DynamicResource NormalBorderBrush}" />
            <Border x:Name="BackgroundNorm_highlight"
                    Margin="1"
                    BorderBrush="{DynamicResource NormalHighlightBrush}"
                    BorderThickness="1,0,1,1"
                    CornerRadius="1"
                    Opacity="0.65" />
            <Border x:Name="BackgroundOver"
                    BorderThickness="1"
                    CornerRadius="1.75"
                    Opacity="0"
                    Background="{DynamicResource MouseOverBrush}"
                    BorderBrush="{DynamicResource MouseOverBorderBrush}" />
            <Border x:Name="BackgroundOver_Highlight"
                    Margin="1"
                    BorderThickness="1,0,1,1"
                    CornerRadius="1"
                    Opacity="0"
                    BorderBrush="{DynamicResource MouseOverHighlightBrush}" />
            <Border x:Name="BackgroundPressed"
                    BorderThickness="1"
                    CornerRadius="1.75"
                    Opacity="0"
                    Background="{DynamicResource PressedBrush}"
                    BorderBrush="{DynamicResource PressedBorderBrush}" />
            <Border x:Name="BackgoundPressed_Highlight"
                    Margin="1"
                    BorderThickness="1,0,1,1"
                    CornerRadius="1"
                    Opacity="0"
                    BorderBrush="{DynamicResource PressedHighlightBrush}" />
            <Border x:Name="DisabledVisualElement"
                    IsHitTestVisible="false"
                    Background="{DynamicResource DisabledBackgroundBrush}"
                    BorderBrush="{DynamicResource DisabledBorderBrush}"
                    BorderThickness="1"
                    Opacity="0" />

            <ContentPresenter x:Name="contentPresenter"
                              Content="{TemplateBinding Content}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Margin="{TemplateBinding Padding}" />
            <TextBlock Panel.ZIndex="1"
                       x:Name="DisabledOverlay"
                       Text="{TemplateBinding Content}"
                       Foreground="#FF8E96A2"
                       HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                       VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                       Margin="{TemplateBinding Padding}"
                       Visibility="Collapsed" />
            <Border x:Name="FocusVisualElement"
                    Margin="-1"
                    BorderBrush="{DynamicResource FocusBrush}"
                    BorderThickness="1"
                    CornerRadius="2.75"
                    IsHitTestVisible="false"
                    Opacity="0" />
            <Border x:Name="DefaultBorder"
                    Margin="-1"
                    BorderBrush="{DynamicResource FocusBrush}"
                    BorderThickness="1"
                    CornerRadius="2.75"
                    IsHitTestVisible="false"
                    Opacity="0" />
        </Grid>

        <ControlTemplate.Triggers>
            <Trigger Property="IsDefault"
                     Value="True">
                <Setter Property="Opacity"
                        TargetName="DefaultBorder"
                        Value="1" />
            </Trigger>
            <Trigger Property="IsFocused"
                     Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="FocusedOn_BeginStoryboard"
                                     Storyboard="{StaticResource FocusedOn}" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="FocusedOff_BeginStoryboard"
                                     Storyboard="{StaticResource FocusedOff}" />
                </Trigger.ExitActions>
            </Trigger>
            <Trigger Property="IsKeyboardFocused"
                     Value="true">

                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="FocusedOff_BeginStoryboard1"
                                     Storyboard="{StaticResource FocusedOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="FocusedOn_BeginStoryboard1"
                                     Storyboard="{StaticResource FocusedOn}" />
                </Trigger.EnterActions>

            </Trigger>
            <Trigger Property="IsMouseOver"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                     x:Name="HoverOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </Trigger.EnterActions>

            </Trigger>
            <Trigger Property="IsPressed"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="true" />
            <Trigger Property="IsEnabled"
                     Value="false">

                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource DisabledOn}" />
                </Trigger.EnterActions>

                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
                <Setter Property="Opacity"
                        TargetName="DisabledVisualElement"
                        Value="1" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="RadioButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="15,0,0,0"
                                   Stroke="#60000000"
                                   StrokeThickness="1"
                                   StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CheckBoxFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="15,0,0,0"
                                   Stroke="#60000000"
                                   StrokeThickness="1"
                                   StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="{x:Type CheckBox}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource CheckBoxFocusVisual}" />
        <Setter Property="Foreground"
                Value="{StaticResource OutsideFontColor}" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Padding"
                Value="4,1,0,0" />
        <Setter Property="Template"
                Value="{DynamicResource CheckBoxTemplate}" />
    </Style>

    <ControlTemplate x:Key="CheckBoxTemplate"
                     TargetType="{x:Type CheckBox}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="BoxOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="1" />
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="BoxOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
            </Storyboard>
            <Storyboard x:Key="PressedOn">
                <ColorAnimation Duration="00:00:00.1000000"
                                Storyboard.TargetName="BoxOver"
                                Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                To="#FFF28A27" />
                <ColorAnimation Duration="00:00:00.1000000"
                                Storyboard.TargetName="BoxOver"
                                Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                To="#FFF4D9BE" />
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="BoxOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="1" />
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="BackgroundFill"
                                 Storyboard.TargetProperty="Opacity"
                                 To="1" />
            </Storyboard>
            <Storyboard x:Key="PressedOff">
                <ColorAnimation Duration="00:00:00.4000000"
                                Storyboard.TargetName="BoxOver"
                                Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                To="#FFFDDA81" />
                <ColorAnimation Duration="00:00:00.4000000"
                                Storyboard.TargetName="BoxOver"
                                Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                To="#FFFCE7AF" />
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="BoxOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="BackgroundFill"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
            </Storyboard>
            <Storyboard x:Key="DisabledOn">
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="DisabledVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>

            </Storyboard>
            <Storyboard x:Key="CheckedOn">
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="BoxPress"
                                 Storyboard.TargetProperty="Opacity"
                                 To="1" />
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="CheckIcon"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="CheckedOff">
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="BoxPress"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="CheckIcon"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.4000000"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="IndeterminateOn">

                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="IndeterminateIcon"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="IndeterminateOff">

                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="IndeterminateIcon"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusedVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusedVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <BulletDecorator Background="Transparent">
            <BulletDecorator.Bullet>
                <Grid>
                    <Rectangle x:Name="Background"
                               Margin="1"
                               Width="13"
                               Height="13"
                               RadiusX="0"
                               RadiusY="0"
                               Fill="{DynamicResource CheckBoxBackgroundBrush}"
                               Stroke="{DynamicResource CheckBoxBorderBrush}"
                               StrokeThickness="1" />
                    <Rectangle x:Name="BoxFill"
                               Width="9"
                               Height="9"
                               RadiusX="0"
                               RadiusY="0"
                               Fill="{DynamicResource CheckBoxInnerBoxBackgroundBrush}"
                               StrokeThickness="1"
                               Stroke="{DynamicResource CheckBoxInnerBoxBorderBrush}" />
                    <Rectangle x:Name="BackgroundFill"
                               Margin="1"
                               Width="13"
                               Height="13"
                               RadiusX="0"
                               RadiusY="0"
                               Fill="{DynamicResource CheckBoxBackgroundFillBrush}"
                               Stroke="#FF5577A3"
                               StrokeThickness="1"
                               Opacity="0" />
                    <Rectangle x:Name="BoxOver"
                               Margin="3"
                               Width="9"
                               Height="9"
                               RadiusX="0"
                               RadiusY="0"
                               Fill="{DynamicResource CheckBoxMouseOverBrush}"
                               StrokeThickness="1"
                               Opacity="0">
                        <Rectangle.Stroke>
                            <LinearGradientBrush EndPoint="0.055,0.119"
                                                 StartPoint="0.886,0.808">
                                <GradientStop Color="#FFFCE7AF" />
                                <GradientStop Color="#FFFDDA81"
                                              Offset="1" />
                            </LinearGradientBrush>
                        </Rectangle.Stroke>
                    </Rectangle>
                    <Rectangle x:Name="BoxPress"
                               Margin="3"
                               Width="9"
                               Height="9"
                               RadiusX="0"
                               RadiusY="0"
                               StrokeThickness="1"
                               Opacity="0"
                               Stroke="{DynamicResource CheckBoxPressBorderBrush}" />
                    <Rectangle x:Name="BoxGradient"
                               Width="7"
                               Height="7"
                               RadiusX="0"
                               RadiusY="0"
                               StrokeThickness="1"
                               Fill="{DynamicResource CheckBoxInnerBoxGradientBrush}" />
                    <Rectangle x:Name="IndeterminateIcon"
                               Width="5"
                               Height="2"
                               Fill="{DynamicResource GlyphBrush}"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Visibility="Collapsed" />
                    <Path x:Name="CheckIcon"
                          Margin="0,3.333,3.833,0"
                          Width="7"
                          Height="9"
                          Fill="{DynamicResource GlyphBrush}"
                          Stretch="Fill"
                          VerticalAlignment="Top"
                          HorizontalAlignment="Right"
                          Data="M103.78572,598.96112 L105.09846,597.5661 L107.00806,600.16229 C107.00806,600.16229 109.91004,592.74463 109.91004,592.74463 C109.91004,592.74463 111.74678,593.79761 111.74678,593.79761 C111.74678,593.79761 107.88566,602.75848 107.88566,602.75848 L106.60118,602.75848 z"
                          Visibility="Collapsed" />
                    <Rectangle x:Name="FocusedVisualElement"
                               RadiusX="0"
                               RadiusY="0"
                               Stroke="{DynamicResource FocusBrush}"
                               StrokeThickness="1"
                               Opacity="0" />
                    <Rectangle x:Name="DisabledVisualElement"
                               Margin="1"
                               RadiusX="0"
                               RadiusY="0"
                               Fill="{DynamicResource DisabledBackgroundBrush}"
                               Visibility="Collapsed" />
                </Grid>
            </BulletDecorator.Bullet>
            <ContentPresenter Grid.Column="1"
                              x:Name="contentPresenter"
                              Content="{TemplateBinding Content}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Margin="{TemplateBinding Padding}" />
        </BulletDecorator>

        <ControlTemplate.Triggers>
            <Trigger Property="IsFocused"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                     x:Name="FocusedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                     x:Name="FocusedOn_BeginStoryboard" />
                </Trigger.EnterActions>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsChecked"
                               Value="True" />
                    <Condition Property="IsThreeState"
                               Value="True" />
                </MultiTrigger.Conditions>
                <MultiTrigger.EnterActions>
                    <BeginStoryboard x:Name="CheckedOff_BeginStoryboard"
                                     Storyboard="{StaticResource CheckedOff}" />
                </MultiTrigger.EnterActions>
                <MultiTrigger.ExitActions>
                    <BeginStoryboard x:Name="CheckedOn_BeginStoryboard"
                                     Storyboard="{StaticResource CheckedOn}" />
                </MultiTrigger.ExitActions>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsChecked"
                               Value="{x:Null}" />
                    <Condition Property="IsThreeState"
                               Value="True" />
                </MultiTrigger.Conditions>
                <MultiTrigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource IndeterminateOn}" />
                </MultiTrigger.EnterActions>
                <MultiTrigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource IndeterminateOff}" />
                </MultiTrigger.ExitActions>
                <Setter Property="Opacity"
                        TargetName="CheckIcon"
                        Value="0" />
            </MultiTrigger>
            <Trigger Property="IsChecked"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="CheckedOn_BeginStoryboard2"
                                     Storyboard="{StaticResource CheckedOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="CheckedOn_BeginStoryboard1"
                                     Storyboard="{StaticResource CheckedOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsMouseOver"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsPressed"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource DisabledOn}" />
                </Trigger.EnterActions>
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>

    </ControlTemplate>

    <Style TargetType="{x:Type RadioButton}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource RadioButtonFocusVisual}" />
        <Setter Property="Foreground"
                Value="{StaticResource OutsideFontColor}" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Padding"
                Value="4,1,0,0" />
        <Setter Property="Template"
                Value="{DynamicResource RadioButtonTemplate}" />
    </Style>

    <ControlTemplate x:Key="RadioButtonTemplate"
                     TargetType="{x:Type RadioButton}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="CircleOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="1" />
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="CircleOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
            </Storyboard>
            <Storyboard x:Key="PressedOn">
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="CirclePress"
                                 Storyboard.TargetProperty="Opacity"
                                 To="1" />
            </Storyboard>
            <Storyboard x:Key="PressedOff">
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="CirclePress"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
            </Storyboard>
            <Storyboard x:Key="DisabledOn" />
            <Storyboard x:Key="CheckedOn">
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="CheckIcon"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="CheckedOff">
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="CheckIcon"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.4000000"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusedVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusedVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <BulletDecorator Background="Transparent">
            <BulletDecorator.Bullet>
                <Grid>
                    <Ellipse x:Name="Background"
                             Margin="1"
                             Width="14"
                             Height="14"
                             Fill="{DynamicResource RadioButtonBackgroundBrush}"
                             Stroke="{DynamicResource RadioButtonBorderBrush}"
                             StrokeThickness="1" />
                    <Ellipse x:Name="CircleFill"
                             Margin="3.045,3.157,2.955,2.843"
                             StrokeThickness="1"
                             Fill="{DynamicResource RadioButtonInnerCircleBrush}"
                             Stroke="{DynamicResource RadioButtonInnerCircleBorderBrush}" />
                    <Ellipse x:Name="CircleOver"
                             Margin="2.847,2.847,3.153,3.153"
                             StrokeThickness="1"
                             Opacity="0"
                             Fill="{DynamicResource RadioButtonMouseOverBrush}"
                             Stroke="{DynamicResource RadioButtonMouseOverBorderBrush}">
                    </Ellipse>
                    <Ellipse x:Name="CirclePress"
                             Margin="2.73,2.73,3.27,3.27"
                             StrokeThickness="1"
                             Opacity="0"
                             Fill="{DynamicResource RadioButtonPressBrush}"
                             Stroke="{DynamicResource RadioButtonPressBorderBrush}" />
                    <Ellipse x:Name="CheckIcon"
                             Margin="4.47,4.498,3.53,3.502"
                             StrokeThickness="1"
                             Visibility="Collapsed"
                             Stroke="{DynamicResource RadioButtonCheckIconBorderBrush}"
                             Fill="{DynamicResource RadioButtonCheckIconBrush}">
                    </Ellipse>
                    <Ellipse x:Name="DisabledVisualElement"
                             Width="14"
                             Height="14"
                             Opacity="0.35"
                             Visibility="Visible">
                        <Ellipse.Stroke>
                            <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                        </Ellipse.Stroke>
                        <Ellipse.Fill>
                            <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                        </Ellipse.Fill>
                    </Ellipse>
                    <Ellipse x:Name="FocusedVisualElement"
                             Width="16"
                             Height="16"
                             Stroke="{DynamicResource FocusBrush}"
                             StrokeThickness="1"
                             IsHitTestVisible="false"
                             Opacity="0" />
                </Grid>
            </BulletDecorator.Bullet>
            <ContentPresenter Grid.Column="1"
                              x:Name="contentPresenter"
                              Content="{TemplateBinding Content}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Margin="{TemplateBinding Padding}" />
        </BulletDecorator>

        <ControlTemplate.Triggers>
            <Trigger Property="IsFocused"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                     x:Name="FocusedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                     x:Name="FocusedOn_BeginStoryboard" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsChecked"
                     Value="false">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource CheckedOn}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>

                    <BeginStoryboard Storyboard="{StaticResource CheckedOff}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsMouseOver"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsPressed"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource DisabledOn}" />
                </Trigger.EnterActions>
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
            </Trigger>

        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="NuclearRepeatButton"
           d:IsControlPart="True"
           TargetType="{x:Type RepeatButton}"
           BasedOn="{x:Null}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundPressed"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundPressed"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="Background"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Highlight"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="Background"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Highlight"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Rectangle x:Name="Background"
                                   RadiusX="0.5"
                                   RadiusY="0.5"
                                   StrokeThickness="1"
                                   Stroke="{DynamicResource ScrollBarRepeatButtonBorderBrush}"
                                   Opacity="0"
                                   Fill="{DynamicResource ScrollBarRepeatButtonBrush}" />
                        <Rectangle x:Name="BackgroundPressed"
                                   RadiusX="0.5"
                                   RadiusY="0.5"
                                   StrokeThickness="1"
                                   Stroke="{DynamicResource ScrollBarRepeatButtonPressedBorderBrush}"
                                   Opacity="0"
                                   Fill="{DynamicResource ScrollBarRepeatButtonPressedBrush}" />
                        <Rectangle x:Name="Highlight"
                                   Margin="1"
                                   RadiusX="0.5"
                                   RadiusY="0.5"
                                   Stroke="#99FFFFFF"
                                   StrokeThickness="1"
                                   Opacity="0"
                                   IsHitTestVisible="false" />
                        <Rectangle x:Name="DisabledElement"
                                   RadiusX="0"
                                   RadiusY="0"
                                   Fill="{DynamicResource DisabledBackgroundBrush}"
                                   Opacity="0" />
                        <ContentPresenter HorizontalAlignment="Center"
                                          x:Name="ContentPresenter"
                                          VerticalAlignment="Center"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true" />
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}"
                                                 x:Name="HoverOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">

                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                            <Setter Property="Opacity"
                                    TargetName="ContentPresenter"
                                    Value="0.5" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style x:Key="NuclearThumbStyle"
           d:IsControlPart="True"
           TargetType="{x:Type Thumb}"
           BasedOn="{x:Null}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundMouseOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundMouseOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundPressed"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundPressed"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid Margin="0,0,0,0"
                          x:Name="ThumbVisual">
                        <Rectangle x:Name="Background"
                                   RadiusX="1.5"
                                   RadiusY="1.5"
                                   StrokeThickness="1"
                                   Stroke="{DynamicResource ScrollBarThumbBorderBrush}"
                                   Fill="{DynamicResource ScrollBarThumbBrush}" />
                        <Rectangle x:Name="BackgroundMouseOver"
                                   RadiusX="1.5"
                                   RadiusY="1.5"
                                   StrokeThickness="1"
                                   Stroke="{DynamicResource ScrollBarThumbMouseOverBorderBrush}"
                                   Opacity="0"
                                   Fill="{DynamicResource ScrollBarThumbMouseOverBrush}" />
                        <Rectangle x:Name="BackgroundPressed"
                                   RadiusX="1.5"
                                   RadiusY="1.5"
                                   StrokeThickness="1"
                                   Stroke="{DynamicResource ScrollBarThumbPressedBorderBrush}"
                                   Opacity="0"
                                   Fill="{DynamicResource ScrollBarThumbPressedBrush}" />
                        <Path Margin="0,-6,0,0"
                              Width="11"
                              Height="1"
                              Stretch="Fill"
                              Stroke="#FF848485"
                              StrokeThickness="1"
                              Data="M4.8333325,7.2499995 L12.012101,7.2499995"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="-0.062,0.5"
                                                     StartPoint="1.062,0.5">
                                    <GradientStop Color="#FFC8C9CC"
                                                  Offset="0.487" />
                                    <GradientStop Color="#FFF0F0F0"
                                                  Offset="0.518" />
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Path Margin="0,-2,0,0"
                              Width="11"
                              Height="1"
                              Stretch="Fill"
                              Stroke="#FF848485"
                              StrokeThickness="1"
                              Data="M4.8333325,7.2499995 L12.012101,7.2499995"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="-0.062,0.5"
                                                     StartPoint="1.062,0.5">
                                    <GradientStop Color="#FFC8C9CC"
                                                  Offset="0.487" />
                                    <GradientStop Color="#FFF0F0F0"
                                                  Offset="0.518" />
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Path Margin="0,0,0,-2"
                              Width="11"
                              Height="1"
                              Stretch="Fill"
                              Stroke="#FF848485"
                              StrokeThickness="1"
                              Data="M4.8333325,7.2499995 L12.012101,7.2499995"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="-0.062,0.5"
                                                     StartPoint="1.062,0.5">
                                    <GradientStop Color="#FFC8C9CC"
                                                  Offset="0.487" />
                                    <GradientStop Color="#FFF0F0F0"
                                                  Offset="0.518" />
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Path Margin="0,0,0,-6"
                              Width="11"
                              Height="1"
                              Stretch="Fill"
                              Stroke="#FF848485"
                              StrokeThickness="1"
                              Data="M4.8333325,7.2499995 L12.012101,7.2499995"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="-0.062,0.5"
                                                     StartPoint="1.062,0.5">
                                    <GradientStop Color="#FFC8C9CC"
                                                  Offset="0.487" />
                                    <GradientStop Color="#FFF0F0F0"
                                                  Offset="0.518" />
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Rectangle x:Name="Highlight"
                                   Margin="1"
                                   RadiusX="0.5"
                                   RadiusY="0.5"
                                   StrokeThickness="1"
                                   Opacity="0.6"
                                   IsHitTestVisible="false"
                                   Stroke="{DynamicResource NormalHighlightBrush}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True" />
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Opacity"
                                    TargetName="ThumbVisual"
                                    Value="0" />
                        </Trigger>
                        <Trigger Property="IsDragging"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NuclearScrollRepeatButtonStyle"
           d:IsControlPart="True"
           TargetType="{x:Type RepeatButton}">
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="IsTabStop"
                Value="false" />
        <Setter Property="Focusable"
                Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Grid>
                        <Rectangle Fill="{TemplateBinding Background}"
                                   Stroke="{TemplateBinding BorderBrush}"
                                   StrokeThickness="{TemplateBinding BorderThickness}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsFlicksEnabled"
                Value="false" />
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid x:Name="GridRoot"
                          Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
                        <Grid.RowDefinitions>
                            <RowDefinition MaxHeight="18" />
                            <RowDefinition Height="0.00001*" />
                            <RowDefinition MaxHeight="18" />
                        </Grid.RowDefinitions>
                        <Rectangle Grid.RowSpan="4"
                                   RadiusX="0"
                                   RadiusY="0"
                                   StrokeThickness="1"
                                   Opacity="1">
                            <Rectangle.Stroke>
                                <SolidColorBrush Color="#FFF0F0F0" />
                            </Rectangle.Stroke>
                            <Rectangle.Fill>
                                <SolidColorBrush Color="#FFEFEFEF" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <RepeatButton x:Name="DecreaseRepeat"
                                      Style="{DynamicResource NuclearRepeatButton}"
                                      Command="ScrollBar.LineUpCommand">
                            <Grid>
                                <Path Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z "
                                      Height="6"
                                      Width="10"
                                      HorizontalAlignment="Center"
                                      VerticalAlignment="Center"
                                      Stretch="Uniform"
                                      IsHitTestVisible="False">
                                    <Path.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1"
                                                             StartPoint="0.5,0">
                                            <GradientStop Color="#FF5E6D91" />
                                            <GradientStop Color="#FF2B3B60"
                                                          Offset="1" />
                                        </LinearGradientBrush>
                                    </Path.Fill>
                                </Path>
                            </Grid>
                        </RepeatButton>

                        <Track Grid.Row="1"
                               x:Name="PART_Track"
                               Orientation="Vertical"
                               IsDirectionReversed="true">
                            <Track.Thumb>
                                <Thumb Style="{DynamicResource NuclearThumbStyle}" />
                            </Track.Thumb>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton x:Name="PageUp"
                                              Style="{DynamicResource NuclearScrollRepeatButtonStyle}"
                                              Command="ScrollBar.PageDownCommand" />
                            </Track.IncreaseRepeatButton>
                            <Track.DecreaseRepeatButton>
                                <RepeatButton x:Name="PageDown"
                                              Style="{DynamicResource NuclearScrollRepeatButtonStyle}"
                                              Command="ScrollBar.PageUpCommand" />
                            </Track.DecreaseRepeatButton>
                        </Track>

                        <RepeatButton Grid.Row="2"
                                      x:Name="IncreaseRepeat"
                                      Style="{DynamicResource NuclearRepeatButton}"
                                      Command="ScrollBar.LineDownCommand">
                            <Grid>
                                <Path Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z "
                                      Grid.Row="4"
                                      Height="6"
                                      Width="10"
                                      HorizontalAlignment="Center"
                                      VerticalAlignment="Center"
                                      Stretch="Uniform"
                                      IsHitTestVisible="False">
                                    <Path.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1"
                                                             StartPoint="0.5,0">
                                            <GradientStop Color="#FF5E6D91"
                                                          Offset="0.004" />
                                            <GradientStop Color="#FF2B3B60"
                                                          Offset="0.996" />
                                        </LinearGradientBrush>
                                    </Path.Fill>
                                </Path>
                            </Grid>
                        </RepeatButton>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="Orientation"
                                 Value="Horizontal">

                            <Setter Property="LayoutTransform"
                                    TargetName="GridRoot">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>

                            <Setter TargetName="PART_Track"
                                    Property="Orientation"
                                    Value="Vertical" />

                            <Setter Property="Command"
                                    Value="ScrollBar.LineLeftCommand"
                                    TargetName="DecreaseRepeat" />
                            <Setter Property="Command"
                                    Value="ScrollBar.LineRightCommand"
                                    TargetName="IncreaseRepeat" />
                            <Setter Property="Command"
                                    Value="ScrollBar.PageLeftCommand"
                                    TargetName="PageDown" />
                            <Setter Property="Command"
                                    Value="ScrollBar.PageRightCommand"
                                    TargetName="PageUp" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ScrollViewer}"
           BasedOn="{x:Null}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ScrollContentPresenter Grid.Column="0"
                                                Grid.Row="0"
                                                Margin="{TemplateBinding Padding}"
                                                Content="{TemplateBinding Content}"
                                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                                CanContentScroll="{TemplateBinding CanContentScroll}" />

                        <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                   Grid.Column="0"
                                   Grid.Row="1"
                                   x:Name="PART_HorizontalScrollBar"
                                   Orientation="Horizontal"
                                   Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                   ViewportSize="{TemplateBinding ViewportWidth}"
                                   Minimum="0"
                                   Maximum="{TemplateBinding ScrollableWidth}"
                                   AutomationProperties.AutomationId="HorizontalScrollBar" />
                        <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                   Grid.Column="1"
                                   Grid.Row="0"
                                   x:Name="PART_VerticalScrollBar"
                                   Orientation="Vertical"
                                   Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                   ViewportSize="{TemplateBinding ViewportHeight}"
                                   Minimum="0"
                                   Maximum="{TemplateBinding ScrollableHeight}"
                                   AutomationProperties.AutomationId="VerticalScrollBar" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="{x:Type ListBox}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll"
                Value="True" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource ControlBorderBrush}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Padding"
                Value="1" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Grid>
                        <Border x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="1"
                                Background="{DynamicResource ControlBackgroundBrush}">
                            <ScrollViewer Margin="1"
                                          Focusable="false"
                                          Foreground="{TemplateBinding Foreground}">

                                <StackPanel Margin="2"
                                            IsItemsHost="true" />

                            </ScrollViewer>
                        </Border>
                        <Border x:Name="DisabledVisualElement"
                                IsHitTestVisible="false"
                                Background="#A5FFFFFF"
                                BorderBrush="#66FFFFFF"
                                BorderThickness="1"
                                Opacity="0" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Opacity"
                                    TargetName="DisabledVisualElement"
                                    Value="1" />
                        </Trigger>
                        <Trigger Property="IsGrouping"
                                 Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll"
                                    Value="false" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style d:IsControlPart="True"
           TargetType="{x:Type ListBoxItem}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="OverridesDefaultStyle"
                Value="true" />
        <Setter Property="Padding"
                Value="3" />
        <Setter Property="Foreground"
                Value="Black" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundGradientOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.73" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundGradientOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundGradientSelected"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.84" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundGradientSelectedDisabled"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.55" />
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundGradientSelected"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundGradientSelectedDisabled"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid SnapsToDevicePixels="true">
                        <Rectangle x:Name="BackgroundGradientOver"
                                   RadiusX="1"
                                   RadiusY="1"
                                   Stroke="{DynamicResource MouseOverBorderBrush}"
                                   Opacity="0"
                                   Fill="{DynamicResource MouseOverBrush}" />
                        <Rectangle x:Name="BackgroundGradientSelectedDisabled"
                                   RadiusX="1"
                                   RadiusY="1"
                                   Opacity="0"
                                   Fill="{DynamicResource ListItemSelectedBrush}"
                                   Stroke="{DynamicResource ListItemSelectedBorderBrush}" />
                        <Rectangle x:Name="BackgroundGradientSelected"
                                   Stroke="{DynamicResource PressedBorderBrush}"
                                   StrokeThickness="1"
                                   RadiusX="1"
                                   RadiusY="1"
                                   Opacity="0"
                                   Fill="{DynamicResource PressedBrush}">

                        </Rectangle>
                        <ContentPresenter x:Name="contentPresenter"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Margin="{TemplateBinding Padding}" />
                    </Grid>
                    <ControlTemplate.Triggers>

                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}"
                                                 x:Name="SelectedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}"
                                                 x:Name="SelectedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>

                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ExpanderHeaderFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle SnapsToDevicePixels="true"
                                   Margin="0"
                                   Stroke="Black"
                                   StrokeDashArray="1 2"
                                   StrokeThickness="1" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ExpanderDownHeaderStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Foreground"
                Value="#FF15428B" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="11" />
        <Setter Property="FontWeight"
                Value="Bold" />
        <Setter Property="Padding"
                Value="6,0,4,0" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="arrow_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="border_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="arrow_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="border_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="CheckedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="-1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow2"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="-1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="CheckedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow2"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Focus_Border"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="arrow_focus"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Focus_Border"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="arrow_focus"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="20" />
                        </Grid.ColumnDefinitions>
                        <Border x:Name="border_fill"
                                Grid.ColumnSpan="2"
                                Background="{DynamicResource ExpanderToggleButtonBrush}" />
                        <Border x:Name="border_inner"
                                Margin="0,0,0,1"
                                Grid.ColumnSpan="2"
                                BorderBrush="#FFFFFFFF"
                                BorderThickness="1,1,0,0" />
                        <Border x:Name="border_bottom"
                                Grid.ColumnSpan="2"
                                BorderBrush="{DynamicResource ExpanderToggleButtonBottomBrush}"
                                BorderThickness="0,0,0,1" />
                        <Border x:Name="border_over"
                                Margin="1"
                                Grid.ColumnSpan="2"
                                Opacity="0"
                                Background="{DynamicResource ExpanderToggleButtonHoverBrush}" />
                        <Rectangle x:Name="arrow_over"
                                   Margin="0,1,1,1"
                                   Grid.Column="1"
                                   Width="20"
                                   Opacity="0"
                                   Fill="{DynamicResource MouseOverBrush}" />
                        <Rectangle x:Name="arrow_focus"
                                   Margin="0,1,1,1"
                                   Grid.Column="1"
                                   Width="20"
                                   Opacity="0"
                                   Fill="{DynamicResource MouseOverBrush}" />
                        <Path x:Name="arrow2"
                              Margin="0,0,6,6"
                              Grid.Column="1"
                              Stroke="{DynamicResource ExpanderToggleArrow2Stroke}"
                              StrokeThickness="1.5"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Data="M 1,1.5 L 4.5,5 L 8,1.5"
                              RenderTransformOrigin="0.5,0.5">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                        <Path x:Name="arrow"
                              Margin="0,2,6,0"
                              Grid.Column="1"
                              Stroke="{DynamicResource ExpanderToggleArrowStroke}"
                              StrokeThickness="1.5"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Data="M 1,1.5 L 4.5,5 L 8,1.5"
                              RenderTransformOrigin="0.5,0.5">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                        <ContentPresenter x:Name="header"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          VerticalAlignment="Center"
                                          IsHitTestVisible="false"
                                          Margin="6,4,4,4" />
                        <Border x:Name="Focus_Border"
                                Margin="-1,-1,-1,0"
                                Grid.ColumnSpan="2"
                                BorderBrush="{DynamicResource FocusBrush}"
                                BorderThickness="1"
                                IsHitTestVisible="false"
                                Panel.ZIndex="1"
                                Opacity="0" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="FocusedOn_BeginStoryboard"
                                                 Storyboard="{StaticResource FocusedOn}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="FocusedOff_BeginStoryboard"
                                                 Storyboard="{StaticResource FocusedOff}" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOff}"
                                                 x:Name="CheckedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOn}"
                                                 x:Name="CheckedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderRightHeaderStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Foreground"
                Value="#FF15428B" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="11" />
        <Setter Property="FontWeight"
                Value="Bold" />
        <Setter Property="Padding"
                Value="6,0,4,0" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="arrow_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="border_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="arrow_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="border_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="CheckedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="-1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow2"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="-1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="CheckedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow2"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Focus_Border"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="arrow_focus"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Focus_Border"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="arrow_focus"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>

                    </ControlTemplate.Resources>
                    <Grid SnapsToDevicePixels="False"
                          Background="Transparent">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="19" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Border x:Name="border_fill"
                                d:LayoutOverrides="GridBox"
                                Grid.ColumnSpan="1"
                                Grid.RowSpan="2"
                                Background="{DynamicResource ExpanderToggleButtonBrush}" />
                        <Border x:Name="border_inner"
                                BorderBrush="#FFFFFFFF"
                                BorderThickness="1,1,0,0"
                                d:LayoutOverrides="GridBox"
                                Grid.ColumnSpan="1"
                                Grid.RowSpan="2" />
                        <Border x:Name="border_bottom"
                                BorderBrush="{DynamicResource ExpanderToggleButtonBrush}"
                                BorderThickness="0,0,0,1"
                                d:LayoutOverrides="GridBox"
                                Grid.ColumnSpan="1"
                                Grid.RowSpan="2" />
                        <Border x:Name="border_over"
                                Opacity="0"
                                d:LayoutOverrides="GridBox"
                                Grid.ColumnSpan="1"
                                Grid.RowSpan="2"
                                Background="{DynamicResource ExpanderToggleButtonHoverBrush}" />
                        <Grid>
                            <Grid.LayoutTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1"
                                                    ScaleY="1" />
                                    <SkewTransform AngleX="0"
                                                   AngleY="0" />
                                    <RotateTransform Angle="0" />
                                    <TranslateTransform X="0"
                                                        Y="0" />
                                </TransformGroup>
                            </Grid.LayoutTransform>
                            <Rectangle x:Name="arrow_focus"
                                       Margin="1"
                                       Grid.Column="1"
                                       Opacity="0"
                                       Fill="{DynamicResource MouseOverBrush}" />
                            <Rectangle x:Name="arrow_over"
                                       Margin="1"
                                       Grid.Column="1"
                                       Opacity="0"
                                       Fill="{DynamicResource MouseOverBrush}" />
                            <Path x:Name="arrow2"
                                  Margin="3,0,0,0"
                                  Grid.Column="1"
                                  Stroke="{DynamicResource ExpanderToggleArrow2Stroke}"
                                  StrokeThickness="1.5"
                                  HorizontalAlignment="Left"
                                  VerticalAlignment="Center"
                                  Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                  RenderTransformOrigin="0.5,0.5">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform Angle="-90" />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                            <Path x:Name="arrow"
                                  Margin="7,0,0,0"
                                  Grid.Column="1"
                                  Stroke="{DynamicResource ExpanderToggleArrowStroke}"
                                  StrokeThickness="1.5"
                                  HorizontalAlignment="Left"
                                  VerticalAlignment="Center"
                                  Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                  RenderTransformOrigin="0.5,0.5">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform Angle="-90" />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </Grid>
                        <ContentPresenter SnapsToDevicePixels="True"
                                          HorizontalAlignment="Center"
                                          Margin="4,4,4,6"
                                          VerticalAlignment="Top"
                                          Grid.Row="1"
                                          RecognizesAccessKey="True">
                            <ContentPresenter.LayoutTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="-90" />
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </ContentPresenter.LayoutTransform>
                        </ContentPresenter>
                        <Border x:Name="Focus_Border"
                                Margin="-1,-1,0,-1"
                                Grid.ColumnSpan="2"
                                BorderBrush="{DynamicResource FocusBrush}"
                                BorderThickness="1"
                                IsHitTestVisible="false"
                                Opacity="0"
                                Panel.ZIndex="1"
                                Grid.RowSpan="2" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="FocusedOn_BeginStoryboard"
                                                 Storyboard="{StaticResource FocusedOn}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="FocusedOff_BeginStoryboard"
                                                 Storyboard="{StaticResource FocusedOff}" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOff}"
                                                 x:Name="CheckedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOn}"
                                                 x:Name="CheckedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderUpHeaderStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Foreground"
                Value="#FF15428B" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="11" />
        <Setter Property="FontWeight"
                Value="Bold" />
        <Setter Property="Padding"
                Value="6,0,4,0" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="arrow_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="border_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="arrow_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="border_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="CheckedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="-1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow2"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="-1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="CheckedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow2"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Focus_Border"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="arrow_focus"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Focus_Border"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="arrow_focus"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>

                    </ControlTemplate.Resources>
                    <Grid Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="20" />
                        </Grid.ColumnDefinitions>
                        <Border x:Name="border_fill"
                                Grid.ColumnSpan="2"
                                Background="{DynamicResource ExpanderToggleButtonBrush}" />
                        <Border x:Name="border_inner"
                                Margin="0,1,0,0"
                                Grid.ColumnSpan="2"
                                BorderBrush="#FFFFFFFF"
                                BorderThickness="1,0,0,1" />
                        <Border x:Name="border_bottom"
                                Grid.ColumnSpan="2"
                                BorderBrush="{DynamicResource ExpanderToggleButtonBottomBrush}"
                                BorderThickness="0,1,0,0" />
                        <Border x:Name="border_over"
                                Margin="1"
                                Grid.ColumnSpan="2"
                                Opacity="0"
                                Background="{DynamicResource ExpanderToggleButtonHoverBrush}" />
                        <Rectangle x:Name="arrow_over"
                                   Margin="0,1,1,1"
                                   Grid.Column="1"
                                   Width="20"
                                   Opacity="0"
                                   Fill="{DynamicResource MouseOverBrush}" />
                        <Rectangle x:Name="arrow_focus"
                                   Margin="0,1,1,1"
                                   Grid.Column="1"
                                   Width="20"
                                   Opacity="0"
                                   Fill="{DynamicResource MouseOverBrush}" />
                        <Path x:Name="arrow2"
                              Margin="0,4,6,0"
                              Grid.Column="1"
                              Stroke="{DynamicResource ExpanderToggleArrow2Stroke}"
                              StrokeThickness="1.5"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Data="M 1,1.5 L 4.5,5 L 8,1.5"
                              RenderTransformOrigin="0.5,0.5">
                            <Path.LayoutTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1"
                                                    ScaleY="1" />
                                    <SkewTransform AngleX="0"
                                                   AngleY="0" />
                                    <RotateTransform Angle="180" />
                                    <TranslateTransform X="0"
                                                        Y="0" />
                                </TransformGroup>
                            </Path.LayoutTransform>
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleY="-1" />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                        <Path x:Name="arrow"
                              Margin="0,0,6,4"
                              Grid.Column="1"
                              Stroke="{DynamicResource ExpanderToggleArrowStroke}"
                              StrokeThickness="1.5"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Data="M 1,1.5 L 4.5,5 L 8,1.5"
                              RenderTransformOrigin="0.5,0.5">
                            <Path.LayoutTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1"
                                                    ScaleY="1" />
                                    <SkewTransform AngleX="0"
                                                   AngleY="0" />
                                    <RotateTransform Angle="180" />
                                    <TranslateTransform X="0"
                                                        Y="0" />
                                </TransformGroup>
                            </Path.LayoutTransform>
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleY="-1" />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                        <ContentPresenter SnapsToDevicePixels="True"
                                          HorizontalAlignment="Center"
                                          Margin="6,4,4,4"
                                          VerticalAlignment="Top"
                                          Grid.Row="1"
                                          RecognizesAccessKey="True" />
                        <Border x:Name="Focus_Border"
                                Margin="-1,0,-1,-1"
                                Grid.ColumnSpan="2"
                                BorderBrush="{DynamicResource FocusBrush}"
                                BorderThickness="1"
                                IsHitTestVisible="false"
                                Visibility="Visible"
                                Canvas.ZIndex="1"
                                Opacity="0" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="FocusedOn_BeginStoryboard"
                                                 Storyboard="{StaticResource FocusedOn}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="FocusedOff_BeginStoryboard"
                                                 Storyboard="{StaticResource FocusedOff}" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOff}"
                                                 x:Name="CheckedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOn}"
                                                 x:Name="CheckedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderLeftHeaderStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Foreground"
                Value="#FF15428B" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="11" />
        <Setter Property="FontWeight"
                Value="Bold" />
        <Setter Property="Padding"
                Value="6,0,4,0" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="arrow_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="border_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="arrow_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="border_over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="CheckedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="-1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow2"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="-1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="CheckedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4000000"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="arrow2"
                                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Focus_Border"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="arrow_focus"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="Focus_Border"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="arrow_focus"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>

                    </ControlTemplate.Resources>
                    <Grid SnapsToDevicePixels="False"
                          Background="Transparent">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="19" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Border x:Name="border_fill"
                                Grid.RowSpan="2"
                                Background="{DynamicResource ExpanderToggleButtonBrush}" />
                        <Border x:Name="border_inner"
                                BorderBrush="#FFFFFFFF"
                                BorderThickness="0,1,1,0"
                                Grid.RowSpan="2" />
                        <Border x:Name="border_bottom"
                                BorderBrush="{DynamicResource ExpanderToggleButtonBottomBrush}"
                                BorderThickness="0,0,0,1"
                                Grid.RowSpan="2" />
                        <Border x:Name="border_over"
                                Opacity="0"
                                Grid.RowSpan="2"
                                Background="{DynamicResource ExpanderToggleButtonHoverBrush}" />
                        <Grid>
                            <Grid.LayoutTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1"
                                                    ScaleY="1" />
                                    <SkewTransform AngleX="0"
                                                   AngleY="0" />
                                    <RotateTransform Angle="0" />
                                    <TranslateTransform X="0"
                                                        Y="0" />
                                </TransformGroup>
                            </Grid.LayoutTransform>
                            <Rectangle x:Name="arrow_over"
                                       Margin="1"
                                       Opacity="0"
                                       Fill="{DynamicResource MouseOverBrush}" />
                            <Rectangle x:Name="arrow_focus"
                                       Margin="1"
                                       Opacity="0"
                                       Fill="{DynamicResource MouseOverBrush}" />
                            <Path x:Name="arrow2"
                                  Margin="3,0,0,0"
                                  Stroke="{DynamicResource ExpanderToggleArrow2Stroke}"
                                  StrokeThickness="1.5"
                                  HorizontalAlignment="Left"
                                  VerticalAlignment="Center"
                                  Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                  RenderTransformOrigin="0.5,0.5">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                            <Path x:Name="arrow"
                                  Margin="7,0,0,0"
                                  Stroke="{DynamicResource ExpanderToggleArrowStroke}"
                                  StrokeThickness="1.5"
                                  HorizontalAlignment="Left"
                                  VerticalAlignment="Center"
                                  Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                  RenderTransformOrigin="0.5,0.5">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </Grid>
                        <ContentPresenter SnapsToDevicePixels="True"
                                          HorizontalAlignment="Center"
                                          Margin="6,4,4,4"
                                          VerticalAlignment="Top"
                                          Grid.Row="1"
                                          RecognizesAccessKey="True">
                            <ContentPresenter.LayoutTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="90" />
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </ContentPresenter.LayoutTransform>
                        </ContentPresenter>
                        <Border x:Name="Focus_Border"
                                Margin="0,-1,-1,-1"
                                Grid.RowSpan="2"
                                BorderBrush="{DynamicResource FocusBrush}"
                                BorderThickness="1"
                                IsHitTestVisible="false"
                                Opacity="0"
                                Panel.ZIndex="1" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="FocusedOn_BeginStoryboard"
                                                 Storyboard="{StaticResource FocusedOn}" />
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="FocusedOff_BeginStoryboard"
                                                 Storyboard="{StaticResource FocusedOff}" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOff}"
                                                 x:Name="CheckedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOn}"
                                                 x:Name="CheckedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Expander}">
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Foreground"
                Value="#FF15428B" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="11" />
        <Setter Property="FontWeight"
                Value="Bold" />
        <Setter Property="Padding"
                Value="6,0,4,0" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Expander}">
                    <Grid>
                        <Border x:Name="Background"
                                BorderThickness="1"
                                Padding="0">

                            <DockPanel>
                                <ToggleButton FontFamily="{TemplateBinding FontFamily}"
                                              FontSize="{TemplateBinding FontSize}"
                                              FontStretch="{TemplateBinding FontStretch}"
                                              FontStyle="{TemplateBinding FontStyle}"
                                              FontWeight="{TemplateBinding FontWeight}"
                                              Foreground="{TemplateBinding Foreground}"
                                              HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              Padding="{TemplateBinding Padding}"
                                              VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                              FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
                                              Margin="1,1,1,0"
                                              MinHeight="0"
                                              MinWidth="0"
                                              x:Name="HeaderSite"
                                              Style="{StaticResource ExpanderDownHeaderStyle}"
                                              Content="{TemplateBinding Header}"
                                              ContentTemplate="{TemplateBinding HeaderTemplate}"
                                              ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                              IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                              DockPanel.Dock="Top" />
                                <Border Visibility="Collapsed"
                                        x:Name="border"
                                        Margin="1,1,1,1"
                                        BorderBrush="#FF848484"
                                        BorderThickness="1,1,1,1"
                                        CornerRadius="1,1,1,1"
                                        Background="{DynamicResource ControlBackgroundBrush}">
                                    <ContentPresenter Focusable="false"
                                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                      Margin="1,1,1,1"
                                                      x:Name="ExpandSite"
                                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                      DockPanel.Dock="Bottom" />
                                </Border>
                            </DockPanel>
                        </Border>
                        <Border x:Name="DisabledVisualElement"
                                IsHitTestVisible="false"
                                Background="{DynamicResource DisabledBackgroundBrush}"
                                BorderBrush="{DynamicResource DisabledBorderBrush}"
                                BorderThickness="1"
                                Opacity="0" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded"
                                 Value="true">
                            <Setter Property="Visibility"
                                    TargetName="border"
                                    Value="Visible" />
                        </Trigger>
                        <Trigger Property="ExpandDirection"
                                 Value="Down" />
                        <Trigger Property="ExpandDirection"
                                 Value="Right">
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ExpandSite"
                                    Value="Right" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="HeaderSite"
                                    Value="Left" />
                            <Setter Property="Style"
                                    TargetName="HeaderSite"
                                    Value="{StaticResource ExpanderRightHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection"
                                 Value="Up">
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ExpandSite"
                                    Value="Top" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="HeaderSite"
                                    Value="Bottom" />
                            <Setter Property="Style"
                                    TargetName="HeaderSite"
                                    Value="{StaticResource ExpanderUpHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection"
                                 Value="Left">
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ExpandSite"
                                    Value="Left" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="HeaderSite"
                                    Value="Right" />
                            <Setter Property="Style"
                                    TargetName="HeaderSite"
                                    Value="{StaticResource ExpanderLeftHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter Property="Opacity"
                                    TargetName="DisabledVisualElement"
                                    Value="1" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <ControlTemplate x:Key="ComboBoxToggleButton"
                     TargetType="{x:Type ToggleButton}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="rectangleOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0.8" />
                <ColorAnimation Duration="00:00:00.1000000"
                                Storyboard.TargetName="Background"
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                To="#FFFFFFFF" />
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="rectangleOver"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
                <ColorAnimation Duration="00:00:00.4000000"
                                Storyboard.TargetName="Background"
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                To="#FFE8E8E8" />
            </Storyboard>
            <Storyboard x:Key="PressedOn">
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="rectanglePress"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0.8" />
                <ColorAnimation Duration="00:00:00.1000000"
                                Storyboard.TargetName="Background"
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                To="#FFFFFFFF" />
            </Storyboard>
            <Storyboard x:Key="PressedOff">
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="rectanglePress"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
                <ColorAnimation Duration="00:00:00.4000000"
                                Storyboard.TargetName="Background"
                                Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                To="#FFE8E8E8" />
            </Storyboard>
            <Storyboard x:Key="CheckedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="BackgroundChecked"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="CheckedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="BackgroundChecked"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid x:Name="grid">
            <Rectangle x:Name="Background"
                       Fill="#FFE8E8E8"
                       Stroke="#FF848484"
                       IsHitTestVisible="false" />
            <Rectangle x:Name="BackgroundChecked"
                       Margin="1"
                       IsHitTestVisible="false"
                       Opacity="0">
                <Rectangle.Fill>
                    <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                </Rectangle.Fill>
            </Rectangle>
            <Rectangle x:Name="rectangleOver"
                       Width="15"
                       Stroke="#FFE8E8E8"
                       HorizontalAlignment="Right"
                       Opacity="0"
                       Fill="{DynamicResource MouseOverBrush}" />
            <Rectangle x:Name="rectanglePress"
                       Width="15"
                       Stroke="#FC9E9D9B"
                       HorizontalAlignment="Right"
                       Opacity="0"
                       Fill="{DynamicResource PressedBrush}" />
            <Rectangle x:Name="DisabledVisualElement"
                       Margin="1"
                       Fill="{DynamicResource DisabledBackgroundBrush}"
                       IsHitTestVisible="false"
                       Visibility="Collapsed" />
            <Path x:Name="BtnArrow"
                  Margin="0,0,4,0"
                  Width="6"
                  Fill="{DynamicResource GlyphBrush}"
                  Stretch="Uniform"
                  HorizontalAlignment="Right"
                  Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z " />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsPressed"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                     x:Name="PressedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                     x:Name="PressedOn_BeginStoryboard" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsMouseOver"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                     x:Name="HoverOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </Trigger.EnterActions>

            </Trigger>
            <Trigger Property="IsChecked"
                     Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource CheckedOff}"
                                     x:Name="CheckedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource CheckedOn}"
                                     x:Name="CheckedOn_BeginStoryboard" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="False">
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
                <Setter Property="Visibility"
                        TargetName="DisabledVisualElement"
                        Value="Visible" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="ComboBoxTextBox"
                     TargetType="{x:Type TextBox}">
        <Border x:Name="PART_ContentHost"
                Focusable="False"
                Background="{TemplateBinding Background}" />
    </ControlTemplate>

    <Style TargetType="{x:Type ComboBox}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="6,2,25,2" />
        <Setter Property="Template"
                Value="{DynamicResource ComboBoxTemplate}" />
    </Style>

    <ControlTemplate x:Key="ComboBoxTemplate"
                     TargetType="{x:Type ComboBox}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="FocusedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid>
            <ToggleButton Focusable="false"
                          IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                          ClickMode="Press"
                          Style="{x:Null}" />
            <ToggleButton Grid.Column="2"
                          Template="{DynamicResource ComboBoxToggleButton}"
                          x:Name="ToggleButton"
                          Focusable="false"
                          IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                          ClickMode="Press" />
            <ContentPresenter HorizontalAlignment="Left"
                              Margin="3,3,23,3"
                              x:Name="ContentSite"
                              VerticalAlignment="Center"
                              Content="{TemplateBinding SelectionBoxItem}"
                              ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                              ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                              IsHitTestVisible="False" />

            <TextBox Visibility="Hidden"
                     Template="{DynamicResource ComboBoxTextBox}"
                     HorizontalAlignment="Left"
                     Margin="3,3,23,3"
                     x:Name="PART_EditableTextBox"
                     Style="{x:Null}"
                     VerticalAlignment="Center"
                     Focusable="True"
                     Background="Transparent"
                     IsReadOnly="{TemplateBinding IsReadOnly}" />
            <Rectangle x:Name="DisabledVisualElement"
                       Fill="{DynamicResource DisabledBackgroundBrush}"
                       Stroke="{DynamicResource DisabledBorderBrush}"
                       RadiusX="0"
                       RadiusY="0"
                       IsHitTestVisible="false"
                       Opacity="0" />
            <Rectangle x:Name="FocusVisualElement"
                       Margin="-1"
                       Stroke="{DynamicResource FocusBrush}"
                       StrokeThickness="1"
                       IsHitTestVisible="false"
                       Opacity="0" />
            <Popup IsOpen="{TemplateBinding IsDropDownOpen}"
                   Placement="Bottom"
                   x:Name="Popup"
                   Focusable="False"
                   AllowsTransparency="True"
                   PopupAnimation="Slide"
                   Margin="0,1,0,0">
                <Grid MaxHeight="{TemplateBinding MaxDropDownHeight}"
                      MinWidth="{TemplateBinding ActualWidth}"
                      x:Name="DropDown"
                      SnapsToDevicePixels="True">
                    <Border x:Name="DropDownBorder"
                            Margin="0,-1,0,0"
                            BorderBrush="{DynamicResource ControlBorderBrush}"
                            BorderThickness="1"
                            CornerRadius="0,0,3,3"
                            Background="{DynamicResource ControlBackgroundBrush}">
                        <ScrollViewer Margin="4,6,4,6"
                                      SnapsToDevicePixels="True"
                                      HorizontalScrollBarVisibility="Auto"
                                      VerticalScrollBarVisibility="Auto"
                                      CanContentScroll="True">

                            <StackPanel IsItemsHost="True"
                                        KeyboardNavigation.DirectionalNavigation="Contained" />

                        </ScrollViewer>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsFocused"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                     x:Name="FocusedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="HasItems"
                     Value="false">
                <Setter Property="MinHeight"
                        Value="95"
                        TargetName="DropDownBorder" />
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
                <Setter Property="Opacity"
                        TargetName="DisabledVisualElement"
                        Value="1" />
            </Trigger>
            <Trigger Property="IsGrouping"
                     Value="true">
                <Setter Property="ScrollViewer.CanContentScroll"
                        Value="false" />
            </Trigger>
            <Trigger Property="AllowsTransparency"
                     SourceName="Popup"
                     Value="true">
                <Setter Property="CornerRadius"
                        Value="4"
                        TargetName="DropDownBorder" />
                <Setter Property="Margin"
                        Value="0,2,0,0"
                        TargetName="DropDownBorder" />
            </Trigger>
            <Trigger Property="IsEditable"
                     Value="true">
                <Setter Property="IsTabStop"
                        Value="false" />
                <Setter Property="Visibility"
                        Value="Visible"
                        TargetName="PART_EditableTextBox" />
                <Setter Property="Visibility"
                        Value="Hidden"
                        TargetName="ContentSite" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style d:IsControlPart="True"
           TargetType="{x:Type ComboBoxItem}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Padding"
                Value="3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HighlightOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundGradientOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.73" />
                        </Storyboard>
                        <Storyboard x:Key="HighlightOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundGradientOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundGradientSelected"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.84" />
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundGradientSelected"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid SnapsToDevicePixels="true">
                        <Rectangle x:Name="BackgroundGradientOver"
                                   RadiusX="1"
                                   RadiusY="1"
                                   Stroke="{DynamicResource MouseOverBorderBrush}"
                                   Opacity="0"
                                   Fill="{DynamicResource MouseOverBrush}" />
                        <Rectangle x:Name="BackgroundGradientSelected"
                                   StrokeThickness="1"
                                   RadiusX="1"
                                   RadiusY="1"
                                   Opacity="0"
                                   Fill="{DynamicResource PressedBrush}"
                                   Stroke="{DynamicResource PressedBorderBrush}" />
                        <ContentPresenter x:Name="contentPresenter"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Margin="{TemplateBinding Padding}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Selector.IsSelected"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}"
                                                 x:Name="SelectedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}"
                                                 x:Name="SelectedOn_BeginStoryboard1" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HighlightOff}"
                                                 x:Name="HighlightOff_BeginStoryboard1" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HighlightOn}" />
                            </Trigger.EnterActions>
                        </Trigger>

                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="{x:Type ProgressBar}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="IndeterminateOn"
                                    RepeatBehavior="Forever">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateGradientFill"
                                                           Storyboard.TargetProperty="(Shape.Fill).(Brush.Transform).(TransformGroup.Children)[0].X"
                                                           RepeatBehavior="Forever">
                                <SplineDoubleKeyFrame KeyTime="0"
                                                      Value="0" />
                                <SplineDoubleKeyFrame KeyTime="00:00:.5"
                                                      Value="20" />
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Duration="00:00:00.0010000"
                                                           Storyboard.TargetName="IndeterminateRoot"
                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00"
                                                        Value="{x:Static Visibility.Visible}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="PART_Track"
                                BorderThickness="1"
                                CornerRadius="3"
                                Opacity="0.825">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1"
                                                     StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFFFFF" />
                                    <GradientStop Color="#FFD8D8D8"
                                                  Offset="0.327" />
                                    <GradientStop Color="#FFDADADA"
                                                  Offset="0.488" />
                                    <GradientStop Color="#FFBEBEBE"
                                                  Offset="0.539" />
                                    <GradientStop Color="#FFD6D6D6"
                                                  Offset="0.77" />
                                    <GradientStop Color="#FFFFFFFF"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <Border.BorderBrush>
                                <LinearGradientBrush EndPoint="0.5,1"
                                                     StartPoint="0.5,0">
                                    <GradientStop Color="#FFBBBBBB"
                                                  Offset="0" />
                                    <GradientStop Color="#FF7E7E7E"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                        </Border>

                        <Rectangle x:Name="PART_Indicator"
                                   Margin="1"
                                   RadiusX="1.5"
                                   RadiusY="1.5"
                                   HorizontalAlignment="Left"
                                   Opacity="0.83"
                                   Fill="{DynamicResource ProgressBarIndicatorBrush}" />
                        <Grid x:Name="IndeterminateRoot"
                              Visibility="Collapsed">
                            <Rectangle x:Name="IndeterminateSolidFill"
                                       Margin="1"
                                       Fill="#FFFF8900"
                                       RadiusX="2"
                                       RadiusY="2" />
                            <Rectangle x:Name="ProgressBarRootGradient"
                                       Margin="1"
                                       Canvas.ZIndex="1"
                                       RadiusX="1.5"
                                       RadiusY="1.5">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1"
                                                         StartPoint="0.5,0">
                                        <GradientStop Color="#69535353"
                                                      Offset="0" />
                                        <GradientStop Color="#FFFDCE9D"
                                                      Offset="0.046" />
                                        <GradientStop Color="#96FFE4B6"
                                                      Offset="0.18" />
                                        <GradientStop Color="#4FFFFFFF"
                                                      Offset="0.507" />
                                        <GradientStop Color="#00D6D6D6"
                                                      Offset="0.516" />
                                        <GradientStop Color="#FFFFC472"
                                                      Offset="1" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle x:Name="IndeterminateGradientFill"
                                       Margin="1"
                                       StrokeThickness="1"
                                       RadiusX="2"
                                       RadiusY="2"
                                       Opacity="0.7">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0,1"
                                                         StartPoint="20,1"
                                                         MappingMode="Absolute"
                                                         SpreadMethod="Repeat">
                                        <LinearGradientBrush.Transform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" />
                                                <SkewTransform AngleX="-10" />
                                            </TransformGroup>
                                        </LinearGradientBrush.Transform>
                                        <GradientStop Color="#FFFFE3BB"
                                                      Offset="0.088" />
                                        <GradientStop Color="#00FF9500"
                                                      Offset="0.475" />
                                        <GradientStop Color="#FFFFE3BB"
                                                      Offset="0.899" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                        </Grid>
                        <Border x:Name="DisabledVisualElement"
                                IsHitTestVisible="false"
                                Background="#A5FFFFFF"
                                BorderBrush="#66FFFFFF"
                                BorderThickness="1"
                                Opacity="0" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Opacity"
                                    TargetName="DisabledVisualElement"
                                    Value="1" />
                        </Trigger>
                        <Trigger Property="IsIndeterminate"
                                 Value="True">
                            <Trigger.ExitActions>
                                <StopStoryboard BeginStoryboardName="IndeterminateOn_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="IndeterminateOn_BeginStoryboard"
                                                 Storyboard="{StaticResource IndeterminateOn}" />
                            </Trigger.EnterActions>
                            <Setter Property="Visibility"
                                    TargetName="PART_Track"
                                    Value="Collapsed" />
                            <Setter Property="Visibility"
                                    TargetName="PART_Indicator"
                                    Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type TextBox}">
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
            </Setter.Value>
        </Setter>
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="4" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="BorderBrush"
                Value="{StaticResource TextControlBorderBrush}" />
        <Setter Property="Template"
                Value="{DynamicResource TextBoxTemplate}" />
    </Style>

    <ControlTemplate x:Key="TextBoxTemplate"
                     TargetType="{x:Type TextBox}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="Over"
                                 Storyboard.TargetProperty="Opacity"
                                 To="1" />
                <DoubleAnimation Duration="00:00:00.1000000"
                                 Storyboard.TargetName="Over_Border"
                                 Storyboard.TargetProperty="Opacity"
                                 To="1" />
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="Over"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
                <DoubleAnimation Duration="00:00:00.4000000"
                                 Storyboard.TargetName="Over_Border"
                                 Storyboard.TargetProperty="Opacity"
                                 To="0" />
            </Storyboard>
            <Storyboard x:Key="FocusedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="DisabledOn">
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="DisabledVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                            Value="{x:Static Visibility.Visible}" />
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="DisabledOff">
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="DisabledVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                            Value="{x:Static Visibility.Collapsed}" />
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid>
            <Border x:Name="BorderBase"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2.75" />
            <Border x:Name="Over"
                    BorderBrush="{DynamicResource FocusBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2.75"
                    Opacity="0" />
            <Border x:Name="Over_Border"
                    Margin="-1"
                    BorderBrush="{DynamicResource MouseOverHighlightBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="3.75"
                    IsHitTestVisible="False"
                    Opacity="0" />
            <ScrollViewer Margin="0"
                          x:Name="PART_ContentHost"
                          Foreground="{DynamicResource OutsideFontColor}" />
            <Border x:Name="DisabledVisualElement"
                    Background="#A5FFFFFF"
                    BorderBrush="#59C0C0C0"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2.75"
                    IsHitTestVisible="False"
                    Visibility="Collapsed" />
            <Border x:Name="ReadOnlyVisualElement"
                    Background="#66FFFFFF"
                    CornerRadius="2.75"
                    Visibility="Collapsed" />
            <Border x:Name="FocusVisualElement"
                    BorderBrush="#FFB1703C"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2.75"
                    IsHitTestVisible="False"
                    Opacity="0" />

        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsFocused"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                     x:Name="FocusedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                     x:Name="FocusedOn_BeginStoryboard" />
                </Trigger.EnterActions>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver"
                               Value="True" />
                    <Condition Property="IsFocused"
                               Value="False" />
                </MultiTrigger.Conditions>
                <MultiTrigger.ExitActions>
                    <BeginStoryboard x:Name="HoverOff_BeginStoryboard"
                                     Storyboard="{StaticResource HoverOff}" />
                </MultiTrigger.ExitActions>
                <MultiTrigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </MultiTrigger.EnterActions>
            </MultiTrigger>
            <Trigger Property="IsEnabled"
                     Value="False">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource DisabledOn}"
                                     x:Name="DisabledOn_BeginStoryboard" />
                </Trigger.EnterActions>

                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource DisabledOff}" />
                </Trigger.EnterActions>

                <Setter Property="Foreground"
                        Value="#FF000000" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style TargetType="{x:Type PasswordBox}">
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
            </Setter.Value>
        </Setter>
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="4" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="BorderBrush"
                Value="{StaticResource TextControlBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="Over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="Over_Border"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="Over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="Over_Border"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="DisabledOn">
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="DisabledVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                                        Value="{x:Static Visibility.Visible}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="BorderBase"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2.75" />
                        <Border x:Name="Over"
                                BorderBrush="{DynamicResource FocusBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2.75"
                                Opacity="0" />
                        <Border x:Name="Over_Border"
                                Margin="-1"
                                BorderBrush="{DynamicResource MouseOverHighlightBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3.75"
                                IsHitTestVisible="False"
                                Opacity="0" />
                        <ScrollViewer Margin="0"
                                      x:Name="PART_ContentHost"
                                      Foreground="{DynamicResource OutsideFontColor}" />
                        <Border x:Name="DisabledVisualElement"
                                Background="#A5FFFFFF"
                                BorderBrush="#59C0C0C0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2.75"
                                IsHitTestVisible="False"
                                Visibility="Collapsed" />
                        <Border x:Name="ReadOnlyVisualElement"
                                Background="#66FFFFFF"
                                CornerRadius="2.75"
                                Visibility="Collapsed" />
                        <Border x:Name="FocusVisualElement"
                                BorderBrush="#FFB1703C"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2.75"
                                IsHitTestVisible="False"
                                Opacity="0" />

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                                 x:Name="FocusedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                                 x:Name="FocusedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard x:Name="HoverOff_BeginStoryboard"
                                                 Storyboard="{StaticResource HoverOff}" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </MultiTrigger.EnterActions>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource DisabledOn}"
                                                 x:Name="DisabledOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type RichTextBox}">
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
            </Setter.Value>
        </Setter>
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="4" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="BorderBrush"
                Value="{StaticResource TextControlBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RichTextBox}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="Over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="Over_Border"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="Over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="Over_Border"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="DisabledOn">
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="DisabledVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000"
                                                        Value="{x:Static Visibility.Visible}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="BorderBase"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2.75" />
                        <Border x:Name="Over"
                                BorderBrush="{DynamicResource FocusBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2.75"
                                Opacity="0" />
                        <Border x:Name="Over_Border"
                                Margin="-1"
                                BorderBrush="{DynamicResource MouseOverHighlightBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3.75"
                                IsHitTestVisible="False"
                                Opacity="0" />
                        <ScrollViewer Margin="0"
                                      x:Name="PART_ContentHost"
                                      Foreground="{DynamicResource OutsideFontColor}" />
                        <Border x:Name="DisabledVisualElement"
                                Background="#A5FFFFFF"
                                BorderBrush="#59C0C0C0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2.75"
                                IsHitTestVisible="False"
                                Visibility="Collapsed" />
                        <Border x:Name="ReadOnlyVisualElement"
                                Background="#66FFFFFF"
                                CornerRadius="2.75"
                                Visibility="Collapsed" />
                        <Border x:Name="FocusVisualElement"
                                BorderBrush="#FFB1703C"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2.75"
                                IsHitTestVisible="False"
                                Opacity="0" />

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                                 x:Name="FocusedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                                 x:Name="FocusedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard x:Name="HoverOff_BeginStoryboard"
                                                 Storyboard="{StaticResource HoverOff}" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </MultiTrigger.EnterActions>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource DisabledOn}"
                                                 x:Name="DisabledOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Label}">
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Label}">
                    <Grid>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          RecognizesAccessKey="True" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Menu}">
        <Setter Property="SnapsToDevicePixels"
                Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <Grid>
                        <Border Margin="1"
                                x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}" />
                        <StackPanel IsItemsHost="True"
                                    ClipToBounds="True"
                                    Orientation="Horizontal"
                                    Background="{DynamicResource TabControlHeaderBrush}" />
                        <Border x:Name="DisabledVisualElement"
                                IsHitTestVisible="false"
                                Background="#A5FFFFFF"
                                BorderBrush="#66FFFFFF"
                                BorderThickness="1"
                                Opacity="0" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Opacity"
                                    TargetName="DisabledVisualElement"
                                    Value="1" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DropShadowBitmapEffect x:Key="PopupDropShadow"
                            ShadowDepth="1.5"
                            Softness="0.15" />

    <Style TargetType="{x:Type MenuItem}">
        <Style.Triggers>
            <Trigger Property="IsHighlighted"
                     Value="True">
                <Setter Property="Foreground">
                    <Setter.Value>
                        <SolidColorBrush Color="{DynamicResource BlackColor}" />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
        <Setter Property="HorizontalContentAlignment"
                Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment"
                Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="Foreground"
                Value="#FFFFFFFF" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HighlightOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="BackgroundGradientOver"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HighlightOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="BackgroundGradientOver"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border x:Name="Border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition MinWidth="17"
                                                  Width="Auto"
                                                  SharedSizeGroup="MenuItemIconColumnGroup" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto"
                                                  SharedSizeGroup="MenuItemIGTColumnGroup" />
                                <ColumnDefinition Width="14" />
                            </Grid.ColumnDefinitions>

                            <ContentPresenter Margin="4,0,6,0"
                                              x:Name="Icon"
                                              VerticalAlignment="Center"
                                              ContentSource="Icon" />

                            <Grid Visibility="Hidden"
                                  Margin="4,0,6,0"
                                  x:Name="GlyphPanel"
                                  VerticalAlignment="Center">
                                <Path x:Name="GlyphPanelpath"
                                      VerticalAlignment="Center"
                                      Fill="{TemplateBinding Foreground}"
                                      Data="M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z"
                                      FlowDirection="LeftToRight" />
                            </Grid>
                            <Rectangle Grid.Column="0"
                                       Grid.ColumnSpan="4"
                                       x:Name="BackgroundGradientOver"
                                       Stroke="#FFDBCE99"
                                       Opacity="0"
                                       Fill="{DynamicResource MouseOverBrush}" />

                            <ContentPresenter Grid.Column="1"
                                              Margin="{TemplateBinding Padding}"
                                              x:Name="HeaderHost"
                                              RecognizesAccessKey="True"
                                              ContentSource="Header" />

                            <Grid Grid.Column="3"
                                  Margin="4,0,6,0"
                                  x:Name="ArrowPanel"
                                  VerticalAlignment="Center">
                                <Path x:Name="ArrowPanelPath"
                                      VerticalAlignment="Center"
                                      Fill="{TemplateBinding Foreground}"
                                      Data="M0,0 L0,8 L4,4 z" />
                            </Grid>

                            <Popup IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
                                   Placement="Right"
                                   x:Name="SubMenuPopup"
                                   Focusable="false"
                                   AllowsTransparency="true"
                                   PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}"
                                   VerticalOffset="-3">
                                <Grid x:Name="SubMenu">
                                    <Border x:Name="SubMenuBorder"
                                            Background="{DynamicResource TabControlHeaderBrush}"
                                            BorderBrush="{DynamicResource ControlBorderBrush}"
                                            BorderThickness="1" />


                                    <StackPanel IsItemsHost="True"
                                                KeyboardNavigation.DirectionalNavigation="Cycle" />
                                </Grid>
                            </Popup>

                        </Grid>
                    </Border>

                    <ControlTemplate.Triggers>

                        <Trigger Property="Role"
                                 Value="TopLevelHeader">
                            <Setter Property="Margin"
                                    Value="0,1,0,1" />
                            <Setter Property="Padding"
                                    Value="6,3,6,3" />
                            <Setter Property="Grid.IsSharedSizeScope"
                                    Value="true" />
                            <Setter Property="Placement"
                                    Value="Bottom"
                                    TargetName="SubMenuPopup" />
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="ArrowPanel" />
                        </Trigger>

                        <Trigger Property="Role"
                                 Value="TopLevelItem">
                            <Setter Property="Margin"
                                    Value="0,1,0,1" />
                            <Setter Property="Padding"
                                    Value="6,3,6,3" />
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="ArrowPanel" />
                        </Trigger>

                        <Trigger Property="Role"
                                 Value="SubmenuHeader">
                            <Setter Property="DockPanel.Dock"
                                    Value="Top" />
                            <Setter Property="Padding"
                                    Value="0,2,0,2" />
                            <Setter Property="Grid.IsSharedSizeScope"
                                    Value="true" />
                        </Trigger>

                        <Trigger Property="Role"
                                 Value="SubmenuItem">
                            <Setter Property="DockPanel.Dock"
                                    Value="Top" />
                            <Setter Property="Padding"
                                    Value="0,2,0,2" />
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="ArrowPanel" />
                        </Trigger>
                        <Trigger Property="IsSuspendingPopupAnimation"
                                 Value="true">
                            <Setter Property="PopupAnimation"
                                    Value="None"
                                    TargetName="SubMenuPopup" />
                        </Trigger>

                        <Trigger Property="Icon"
                                 Value="{x:Null}">
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="Icon" />
                        </Trigger>

                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="GlyphPanel" />
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="Icon" />
                        </Trigger>

                        <Trigger Property="AllowsTransparency"
                                 SourceName="SubMenuPopup"
                                 Value="true">
                            <Setter Property="Margin"
                                    Value="0,0,3,3"
                                    TargetName="SubMenu" />
                            <Setter Property="SnapsToDevicePixels"
                                    Value="true"
                                    TargetName="SubMenu" />
                            <Setter Property="BitmapEffect"
                                    Value="{DynamicResource PopupDropShadow}"
                                    TargetName="SubMenuBorder" />
                        </Trigger>

                        <Trigger Property="IsHighlighted"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HighlightOff}"
                                                 x:Name="HighlightOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HighlightOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Separator}">
        <Setter Property="Height"
                Value="1" />
        <Setter Property="Margin"
                Value="0,2,0,2" />
        <Setter Property="Focusable"
                Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <Border BorderBrush="#FFB1703C"
                            BorderThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type TabControl}">
        <Setter Property="Background"
                Value="#FFFFFFFF" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="5" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid ClipToBounds="true"
                          SnapsToDevicePixels="true"
                          KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0" />
                            <ColumnDefinition x:Name="ColumnDefinition1"
                                              Width="0" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"
                                           x:Name="RowDefinition0" />
                            <RowDefinition Height="*"
                                           x:Name="RowDefinition1" />
                        </Grid.RowDefinitions>
                        <Border Background="{DynamicResource TabControlHeaderBrush}"
                                CornerRadius="2,2,0,0"
                                x:Name="border"
                                Margin="0,0,0,-2"
                                Panel.ZIndex="100">
                            <TabPanel x:Name="HeaderPanel"
                                      IsItemsHost="true"
                                      Panel.ZIndex="1"
                                      KeyboardNavigation.TabIndex="1"
                                      RenderTransformOrigin="0.5,0.5"
                                      Width="Auto"
                                      Height="Auto"
                                      Margin="4,0,0,0">
                                <TabPanel.LayoutTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </TabPanel.LayoutTransform>
                                <TabPanel.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </TabPanel.RenderTransform>
                            </TabPanel>
                        </Border>
                        <Border Grid.Row="1"
                                x:Name="ContentPanel"
                                Background="{DynamicResource TabControlContentBrush}"
                                BorderBrush="{DynamicResource TabControlContentBorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3,3,1,1">
                            <ContentPresenter Margin="4"
                                              x:Name="PART_SelectedContentHost"
                                              ContentSource="SelectedContent" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement"
                                 Value="Bottom">
                            <Setter Property="Grid.Row"
                                    TargetName="ContentPanel"
                                    Value="0" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition0"
                                    Value="*" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition1"
                                    Value="Auto" />
                            <Setter Property="Grid.Row"
                                    TargetName="border"
                                    Value="1" />
                            <Setter Property="CornerRadius"
                                    TargetName="ContentPanel"
                                    Value="2,2,0,0" />
                            <Setter Property="CornerRadius"
                                    TargetName="border"
                                    Value="0,0,2,2" />
                            <Setter Property="Margin"
                                    TargetName="HeaderPanel"
                                    Value="4,-2.5,0,0" />
                            <Setter Property="Margin"
                                    TargetName="border"
                                    Value="0,0,0,0" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Left">

                            <Setter Property="Grid.Row"
                                    TargetName="HeaderPanel"
                                    Value="0" />
                            <Setter Property="Grid.Row"
                                    TargetName="ContentPanel"
                                    Value="0" />
                            <Setter Property="Grid.Column"
                                    TargetName="ContentPanel"
                                    Value="1" />
                            <Setter Property="Width"
                                    TargetName="ColumnDefinition0"
                                    Value="Auto" />
                            <Setter Property="Width"
                                    TargetName="ColumnDefinition1"
                                    Value="*" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition0"
                                    Value="*" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition1"
                                    Value="0" />
                            <Setter Property="Grid.Column"
                                    TargetName="border"
                                    Value="0" />
                            <Setter Property="Margin"
                                    TargetName="border"
                                    Value="0,0,0,0" />
                            <Setter Property="Margin"
                                    TargetName="ContentPanel"
                                    Value="0,0,0,0" />
                            <Setter Property="CornerRadius"
                                    TargetName="border"
                                    Value="0,2,2,0" />
                            <Setter Property="CornerRadius"
                                    TargetName="ContentPanel"
                                    Value="0,2,2,0" />
                            <Setter Property="Margin"
                                    TargetName="HeaderPanel"
                                    Value="4,0,-2.5,0" />

                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Right">
                            <Setter Property="Grid.Row"
                                    TargetName="HeaderPanel"
                                    Value="0" />
                            <Setter Property="Grid.Row"
                                    TargetName="ContentPanel"
                                    Value="0" />
                            <Setter Property="Grid.Column"
                                    TargetName="ContentPanel"
                                    Value="0" />
                            <Setter Property="Width"
                                    TargetName="ColumnDefinition0"
                                    Value="*" />
                            <Setter Property="Width"
                                    TargetName="ColumnDefinition1"
                                    Value="Auto" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition0"
                                    Value="*" />
                            <Setter Property="Height"
                                    TargetName="RowDefinition1"
                                    Value="0" />
                            <Setter Property="Grid.Column"
                                    TargetName="border"
                                    Value="1" />
                            <Setter Property="CornerRadius"
                                    TargetName="ContentPanel"
                                    Value="2,0,0,2" />
                            <Setter Property="CornerRadius"
                                    TargetName="border"
                                    Value="0,2,2,0" />
                            <Setter Property="Margin"
                                    TargetName="HeaderPanel"
                                    Value="-3,0,0,0" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



    <Style d:IsControlPart="True"
           TargetType="{x:Type TabItem}">
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Padding"
                Value="10,6,10,6" />
        <Setter Property="MinWidth"
                Value="5" />
        <Setter Property="MinHeight"
                Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedState"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="UnSelectedState"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="UnSelectedState"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="SelectedState"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="TopUnselectedOver"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="TopUnselectedBorderOver"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="TopUnselectedOver"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="TopUnselectedBorderOver"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualTop"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualTop"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid x:Name="grid"
                          Margin="2,1,2,0">
                        <Grid.LayoutTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1"
                                                ScaleY="1" />
                                <SkewTransform AngleX="0"
                                               AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0"
                                                    Y="0" />
                            </TransformGroup>
                        </Grid.LayoutTransform>
                        <Grid>

                            <Grid Margin="1,0,1,0"
                                  x:Name="UnSelectedState">
                                <Border x:Name="TopUnselectedOver"
                                        BorderBrush="{DynamicResource TabItemHoverBorderBrush}"
                                        BorderThickness="1,1,1,0"
                                        CornerRadius="2.21,2.21,.5,.5"
                                        Opacity="0"
                                        Background="{DynamicResource TabItemHoverBrush}" />
                                <Border x:Name="TopUnselectedBorderOver"
                                        Margin="-1,-1,-1,0.5"
                                        BorderBrush="{DynamicResource TabItemHoverHighlightBrush}"
                                        BorderThickness="1,1,1,0"
                                        CornerRadius="3.5,3.5,0,0"
                                        Opacity="0" />
                            </Grid>
                            <Grid Margin="1,0,1,-1"
                                  x:Name="SelectedState"
                                  Opacity="0">
                                <Border x:Name="BackgroundTop"
                                        BorderBrush="{DynamicResource TabItemSelectedBorderBrush}"
                                        BorderThickness="2,0,2,0"
                                        CornerRadius="3,3,0,0"
                                        Background="{DynamicResource TabItemSelectedBrush}" />
                                <Border x:Name="BorderTop"
                                        BorderThickness="2,0,2,0"
                                        CornerRadius="3,3,0,0"
                                        BorderBrush="{DynamicResource TabItemBorderTopBrush}" />
                                <Border x:Name="HighlightTop"
                                        Margin="2,0,2,0"
                                        BorderThickness="1,3,1,0"
                                        CornerRadius="1.25,1.25,0,0"
                                        BorderBrush="{DynamicResource TabItemHighlightTopBrush}" />
                                <Border x:Name="BorderTop2"
                                        Margin="-1,0,-1,0"
                                        BorderBrush="{DynamicResource TabItemBorderTop2Brush}"
                                        BorderThickness="1,1,1,0"
                                        CornerRadius="3,3,0,0"
                                        IsHitTestVisible="false" />
                                <Border x:Name="FocusVisualTop"
                                        Margin="-1,0,-1,0"
                                        BorderThickness="3,2,3,0"
                                        CornerRadius="3,3,0,0"
                                        Opacity="0"
                                        BorderBrush="{DynamicResource TabItemFocusBrush}">
                                </Border>
                            </Grid>
                            <Border x:Name="DisabledVisualTopSelected"
                                    Margin="1,0,1,0"
                                    Background="{DynamicResource DisabledBackgroundBrush}"
                                    CornerRadius="3,3,0,0"
                                    IsHitTestVisible="false"
                                    Visibility="Collapsed" />
                            <ContentPresenter HorizontalAlignment="Center"
                                              Margin="{TemplateBinding Padding}"
                                              x:Name="ContentSite"
                                              VerticalAlignment="Center"
                                              RecognizesAccessKey="True"
                                              ContentSource="Header" />

                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                                 x:Name="FocusedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                                 x:Name="FocusedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Left">
                            <Setter Property="LayoutTransform"
                                    TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="-90" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Right">
                            <Setter Property="LayoutTransform"
                                    TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="TabStripPlacement"
                                 Value="Bottom">
                            <Setter Property="LayoutTransform"
                                    TargetName="ContentSite">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="180" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="LayoutTransform"
                                    TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1"
                                                        ScaleY="1" />
                                        <SkewTransform AngleX="0"
                                                       AngleY="0" />
                                        <RotateTransform Angle="180" />
                                        <TranslateTransform X="0"
                                                            Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}"
                                                 x:Name="HoverOn_BeginStoryboard" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="Selector.IsSelected"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                        <Trigger Property="IsSelected"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}"
                                                 x:Name="SelectedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}" />
                            </Trigger.EnterActions>
                            <Setter Property="Panel.ZIndex"
                                    Value="100" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True"
                                           SourceName="grid" />
                                <Condition Property="Selector.IsSelected"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground">
            <Setter.Value>
                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Selector.IsSelected"
                     Value="True">
                <Setter Property="Foreground"
                        Value="{DynamicResource OutsideFontColor}" />
            </Trigger>
        </Style.Triggers>
    </Style>


    <Style x:Key="NuclearSliderThumb"
           d:IsControlPart="True"
           TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="Height"
                Value="21" />
        <Setter Property="Width"
                Value="15" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="Over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="Over"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="Press"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="Press"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Path x:Name="Base"
                              Margin="1,1.312,1,0.375"
                              Fill="{DynamicResource SliderThumbBrush}"
                              Stretch="Fill"
                              Stroke="{DynamicResource SliderThumbBorderBrush}"
                              StrokeThickness="1"
                              StrokeLineJoin="Round"
                              Data="M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4266928 L-6.6465902,1.7712332 L-9.9818907,1.433604 z" />
                        <Path x:Name="Over"
                              Margin="2,2.312,2,1.375"
                              Fill="{DynamicResource MouseOverBrush}"
                              Stretch="Fill"
                              Data="M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z"
                              Opacity="0" />
                        <Path x:Name="Press"
                              Margin="2,2.312,2,1.375"
                              Fill="{DynamicResource PressedBrush}"
                              Stretch="Fill"
                              Data="M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z"
                              Opacity="0" />
                        <Path x:Name="whiteGradient"
                              Margin="2,2.312,2,1.375"
                              Stretch="Fill"
                              Data="M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="0.5,0"
                                                     StartPoint="0.563,0.979">
                                    <GradientStop Color="#5FFFFFFF"
                                                  Offset="0" />
                                    <GradientStop Color="#5FFFFFFF"
                                                  Offset="0.259" />
                                    <GradientStop Color="#00FFFFFF"
                                                  Offset="0.393" />
                                    <GradientStop Color="#00FFFFFF"
                                                  Offset="0.643" />
                                    <GradientStop Color="#75FFFFFF"
                                                  Offset="0.75" />
                                    <GradientStop Color="#99FFFFFF"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Path x:Name="Line"
                              Margin="-1,-2,0,0"
                              Height="10"
                              Width="1"
                              Stretch="Fill"
                              Stroke="#FF6B81A0"
                              StrokeThickness="1"
                              Data="M5.4375,2.6875 L5.4375,12.1875"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center" />
                        <Path x:Name="Line2"
                              Margin="0,-2,-1,0"
                              Height="10"
                              Width="1"
                              Stretch="Fill"
                              Stroke="#FFFFFFFF"
                              StrokeThickness="1"
                              Data="M5.4375,2.6875 L5.4375,12.1875"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center" />
                        <Path x:Name="DisabledVisualElement"
                              Margin="1,1.312,1,0.375"
                              Fill="#FFFFFFFF"
                              Stroke="#FFFFFFFF"
                              StrokeThickness="1"
                              StrokeLineJoin="Round"
                              Stretch="Fill"
                              Opacity="0"
                              Data="M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4266928 L-6.6465902,1.7712332 L-9.9818907,1.433604 z"
                              IsHitTestVisible="false" />
                        <Path x:Name="FocusVisualElement"
                              Stretch="Fill"
                              Stroke="{DynamicResource FocusBrush}"
                              StrokeThickness="1"
                              StrokeLineJoin="Round"
                              Data="M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z"
                              IsHitTestVisible="false"
                              Opacity="0" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                                 x:Name="FocusedOff_BeginStoryboard1" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                                 x:Name="FocusedOn_BeginStoryboard1" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsDragging"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="True">

                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="HoverOff_BeginStoryboard"
                                                 Storyboard="{StaticResource HoverOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Opacity"
                                    TargetName="DisabledVisualElement"
                                    Value="0.5" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Slider}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Slider}">
                    <Grid x:Name="GridRoot">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto"
                                           MinHeight="{TemplateBinding MinHeight}" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <TickBar Visibility="Collapsed"
                                 x:Name="TopTick"
                                 Height="4"
                                 SnapsToDevicePixels="True"
                                 Placement="Top"
                                 Fill="#FF405A78" />
                        <Rectangle Margin="7.5,0,7.5,0"
                                   Grid.Column="0"
                                   Height="6"
                                   RadiusX="3"
                                   RadiusY="3"
                                   Grid.Row="1"
                                   Fill="{DynamicResource SliderBackgroundBrush}" />

                        <Track Grid.Row="1"
                               x:Name="PART_Track">
                            <Track.Thumb>
                                <Thumb Style="{DynamicResource NuclearSliderThumb}" />
                            </Track.Thumb>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Style="{DynamicResource NuclearScrollRepeatButtonStyle}"
                                              Command="Slider.IncreaseLarge" />
                            </Track.IncreaseRepeatButton>
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Style="{DynamicResource NuclearScrollRepeatButtonStyle}"
                                              Command="Slider.DecreaseLarge" />
                            </Track.DecreaseRepeatButton>
                        </Track>

                        <TickBar Visibility="Collapsed"
                                 Grid.Row="2"
                                 x:Name="BottomTick"
                                 Height="4"
                                 SnapsToDevicePixels="True"
                                 Placement="Bottom"
                                 Fill="{TemplateBinding Foreground}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TickPlacement"
                                 Value="TopLeft">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="TopTick" />
                        </Trigger>
                        <Trigger Property="TickPlacement"
                                 Value="BottomRight">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="BottomTick" />
                        </Trigger>
                        <Trigger Property="TickPlacement"
                                 Value="Both">
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="TopTick" />
                            <Setter Property="Visibility"
                                    Value="Visible"
                                    TargetName="BottomTick" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Opacity"
                                    TargetName="GridRoot"
                                    Value="0.65" />

                        </Trigger>

                        <Trigger Property="Orientation"
                                 Value="Vertical">
                            <Setter Property="LayoutTransform"
                                    TargetName="GridRoot">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="PART_Track"
                                    Property="Orientation"
                                    Value="Horizontal" />
                        </Trigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type TreeView}">
        <Setter Property="Background"
                Value="{DynamicResource ControlBackgroundBrush}" />
        <Setter Property="Foreground"
                Value="Black" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource ControlBorderBrush}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Padding"
                Value="4" />
        <Setter Property="Cursor"
                Value="Arrow" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeView}">
                    <Grid>
                        <Border x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2"
                                Background="{DynamicResource ControlBackgroundBrush}">
                            <ScrollViewer Focusable="False"
                                          Background="{TemplateBinding Background}"
                                          Padding="4"
                                          HorizontalScrollBarVisibility="Auto"
                                          VerticalScrollBarVisibility="Auto"
                                          CanContentScroll="False">
                                <ItemsPresenter />
                            </ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NuclearTreeViewItemToggleButton"
           d:IsControlPart="True"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <ColorAnimation Duration="0"
                                            Storyboard.TargetName="UncheckedVisual"
                                            Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                            To="#FFFFCB66" />
                            <ColorAnimation Duration="0"
                                            Storyboard.TargetName="UncheckedVisual"
                                            Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)"
                                            To="#FFFFCB66" />
                            <ColorAnimation Duration="0"
                                            Storyboard.TargetName="CheckedVisual"
                                            Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                            To="#FFFFCB66" />
                            <ColorAnimation Duration="0"
                                            Storyboard.TargetName="CheckedVisual"
                                            Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)"
                                            To="#FFFFCB66" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <ColorAnimation Duration="0"
                                            Storyboard.TargetName="UncheckedVisual"
                                            Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                            To="#FF9EC6FB" />
                            <ColorAnimation Duration="0"
                                            Storyboard.TargetName="UncheckedVisual"
                                            Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)"
                                            To="#FF9EC6FB" />
                            <ColorAnimation Duration="0"
                                            Storyboard.TargetName="CheckedVisual"
                                            Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                            To="#FFE56E17" />
                            <ColorAnimation Duration="0"
                                            Storyboard.TargetName="CheckedVisual"
                                            Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)"
                                            To="#FFE56E17" />
                        </Storyboard>
                        <Storyboard x:Key="CheckedOn">
                            <DoubleAnimation Duration="0"
                                             Storyboard.TargetName="UncheckedVisual"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="0"
                                             Storyboard.TargetName="CheckedVisual"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                        </Storyboard>
                        <Storyboard x:Key="CheckedOff">
                            <DoubleAnimation Duration="0"
                                             Storyboard.TargetName="UncheckedVisual"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="0"
                                             Storyboard.TargetName="CheckedVisual"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid HorizontalAlignment="Right"
                          Margin="2,2,5,2">
                        <Path x:Name="UncheckedVisual"
                              Height="9"
                              Width="6"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Fill="#FF9EC6FB"
                              Stroke="#FF9EC6FB"
                              StrokeLineJoin="Miter"
                              Data="M 0,0 L 0,9 L 5,4.5 Z" />
                        <Path x:Name="CheckedVisual"
                              Height="6"
                              Width="6"
                              HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Fill="#FFE56E17"
                              Stroke="#FFE56E17"
                              StrokeLineJoin="Miter"
                              Opacity="0"
                              Data="M 6,0 L 6,6 L 0,6 Z" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsChecked"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOff}"
                                                 x:Name="CheckedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOn}"
                                                 x:Name="CheckedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style d:IsControlPart="True"
           TargetType="{x:Type TreeViewItem}">
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Padding"
                Value="5,3,15,3" />
        <Setter Property="Cursor"
                Value="Arrow" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeViewItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="select_gradient"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="select_gradient"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="hover_gradient"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.85" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="highlight"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.65" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="hover_gradient"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="highlight"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="InactiveOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="inactive"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="InactiveOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="inactive"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid x:Name="grid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition MinWidth="19"
                                              Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <ToggleButton x:Name="Expander"
                                      Style="{DynamicResource NuclearTreeViewItemToggleButton}"
                                      IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"
                                      ClickMode="Press" />

                        <Rectangle x:Name="select_gradient"
                                   Grid.Column="1"
                                   StrokeThickness="1"
                                   RadiusX="1"
                                   RadiusY="1"
                                   Opacity="0"
                                   IsHitTestVisible="False"
                                   Fill="{DynamicResource PressedBrush}"
                                   Stroke="{DynamicResource PressedBorderBrush}" />
                        <Rectangle x:Name="inactive"
                                   Grid.Column="1"
                                   Fill="#FF999999"
                                   Stroke="#FF333333"
                                   StrokeThickness="1"
                                   RadiusX="2"
                                   RadiusY="2"
                                   Opacity="0"
                                   IsHitTestVisible="False" />

                        <Rectangle x:Name="hover_gradient"
                                   Stroke="{DynamicResource FocusBrush}"
                                   StrokeThickness="1"
                                   RadiusX="1"
                                   RadiusY="1"
                                   Opacity="0"
                                   IsHitTestVisible="False"
                                   Grid.Column="1"
                                   Fill="{DynamicResource MouseOverBrush}" />
                        <Rectangle x:Name="highlight"
                                   Margin="1"
                                   StrokeThickness="1"
                                   RadiusX="0.5"
                                   RadiusY="0.5"
                                   Opacity="0"
                                   IsHitTestVisible="False"
                                   Grid.Column="1"
                                   Stroke="{DynamicResource MouseOverHighlightBrush}" />

                        <Border Grid.Column="1"
                                x:Name="Selection_Border"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              x:Name="PART_Header"
                                              ContentSource="Header" />
                        </Border>
                        <ItemsPresenter Grid.Column="1"
                                        Grid.ColumnSpan="2"
                                        Grid.Row="1"
                                        x:Name="ItemsHost" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True"
                                 SourceName="Selection_Border">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}"
                                                 x:Name="HoverOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsExpanded"
                                 Value="false">
                            <Setter Property="Visibility"
                                    Value="Collapsed"
                                    TargetName="ItemsHost" />
                        </Trigger>
                        <Trigger Property="HasItems"
                                 Value="false">
                            <Setter Property="Visibility"
                                    Value="Hidden"
                                    TargetName="Expander" />
                        </Trigger>
                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="SelectedOff_BeginStoryboard"
                                                 Storyboard="{StaticResource SelectedOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource InactiveOff}"
                                                 x:Name="InactiveOff_BeginStoryboard" />
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource InactiveOn}"
                                                 x:Name="InactiveOn_BeginStoryboard" />
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true" />
                                <Condition Property="IsSelectionActive"
                                           Value="false" />
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Static ToolBar.ButtonStyleKey}"
           TargetType="{x:Type Button}"
           BasedOn="{x:Null}">
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource NuclearButtonFocusVisual}" />
        <Setter Property="Foreground"
                Value="#FF042271" />
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="MinHeight"
                Value="18" />
        <Setter Property="MinWidth"
                Value="50" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="3" />
        <Setter Property="Template"
                Value="{DynamicResource ButtonTemplate}" />
    </Style>

    <Style x:Key="{x:Static ToolBar.CheckBoxStyleKey}"
           TargetType="{x:Type CheckBox}">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource CheckBoxFocusVisual}" />
        <Setter Property="Foreground"
                Value="{StaticResource OutsideFontColor}" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Padding"
                Value="4,1,0,0" />
        <Setter Property="Template"
                Value="{DynamicResource CheckBoxTemplate}" />
    </Style>

    <Style x:Key="{x:Static ToolBar.RadioButtonStyleKey}"
           TargetType="{x:Type RadioButton}">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource RadioButtonFocusVisual}" />
        <Setter Property="Foreground"
                Value="{StaticResource OutsideFontColor}" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Padding"
                Value="4,1,0,0" />
        <Setter Property="Template"
                Value="{DynamicResource RadioButtonTemplate}" />
    </Style>

    <Style x:Key="{x:Static ToolBar.ComboBoxStyleKey}"
           TargetType="{x:Type ComboBox}">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="6,2,25,2" />

        <Setter Property="Template"
                Value="{DynamicResource ComboBoxTemplate}" />
    </Style>

    <Style x:Key="{x:Static ToolBar.TextBoxStyleKey}"
           TargetType="{x:Type TextBox}">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="KeyboardNavigation.TabNavigation"
                Value="None" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
            </Setter.Value>
        </Setter>
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="4" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0">
                    <GradientStop Color="#FFABAEB3" />
                    <GradientStop Color="#FFE2E8EE"
                                  Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template"
                Value="{DynamicResource TextBoxTemplate}" />
    </Style>

    <LinearGradientBrush x:Key="ToolBarHorizontalBackground"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#FFFFFF"
                      Offset="0" />
        <GradientStop Color="#FFFBFF"
                      Offset="0.5" />
        <GradientStop Color="#F7F7F7"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ToolBarToggleButtonHorizontalBackground"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#ECECEC"
                      Offset="0" />
        <GradientStop Color="#DDDDDD"
                      Offset="0.5" />
        <GradientStop Color="#A0A0A0"
                      Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ToolBarButtonHover"
                     Color="#FF125E7C" />
    <SolidColorBrush x:Key="ToolBarGripper"
                     Color="#C6C3C6" />
    <Style x:Key="ToolBarHorizontalOverflowButtonStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Background"
                Value="{StaticResource ToolBarToggleButtonHorizontalBackground}" />
        <Setter Property="MinHeight"
                Value="0" />
        <Setter Property="MinWidth"
                Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="BackgroundOver"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="BackgroundOver_Highlight"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="0.65" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="BackgroundOver"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="BackgroundOver_Highlight"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border SnapsToDevicePixels="true"
                                x:Name="Bd"
                                CornerRadius="0,0,0,0"
                                Background="{DynamicResource NormalBrush}" />
                        <Border x:Name="BackgroundOver"
                                BorderThickness="1"
                                CornerRadius="1.75"
                                Opacity="0"
                                Background="{DynamicResource MouseOverBrush}"
                                BorderBrush="{DynamicResource MouseOverBorderBrush}" />
                        <Border x:Name="BackgroundOver_Highlight"
                                BorderThickness="1,0,1,1"
                                CornerRadius="1"
                                Opacity="0"
                                Margin="0,0,0,0"
                                BorderBrush="{DynamicResource MouseOverHighlightBrush}" />
                        <Canvas SnapsToDevicePixels="true"
                                HorizontalAlignment="Right"
                                Margin="7,2,2,2"
                                VerticalAlignment="Bottom"
                                Width="6"
                                Height="7">
                            <Path Stroke="White"
                                  Data="M 1 1.5 L 6 1.5" />
                            <Path Stroke="{TemplateBinding Foreground}"
                                  Data="M 0 0.5 L 5 0.5" />
                            <Path Fill="White"
                                  Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" />
                            <Path Fill="{TemplateBinding Foreground}"
                                  Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" />
                        </Canvas>
                        <Border x:Name="FocusVisualElement"
                                Margin="-1"
                                BorderBrush="#FFE99862"
                                BorderThickness="1"
                                CornerRadius="2.75"
                                IsHitTestVisible="false"
                                Opacity="0" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                                 x:Name="FocusedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                                 x:Name="FocusedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{StaticResource ToolBarGripper}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <SolidColorBrush x:Key="ToolBarSubMenuBackground"
                     Color="#FFFDFDFD" />
    <SolidColorBrush x:Key="ToolBarMenuBorder"
                     Color="#FFFFFFFF" />
    <Style x:Key="ToolBarThumbStyle"
           TargetType="{x:Type Thumb}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border SnapsToDevicePixels="True"
                            Background="Transparent"
                            Padding="{TemplateBinding Padding}"
                            CornerRadius="0,0,0,0">
                        <Rectangle>
                            <Rectangle.Fill>
                                <DrawingBrush TileMode="Tile"
                                              Viewbox="0,0,4,4"
                                              ViewboxUnits="Absolute"
                                              Viewport="0,0,4,4"
                                              ViewportUnits="Absolute">
                                    <DrawingBrush.Drawing>
                                        <DrawingGroup>
                                            <GeometryDrawing Brush="White"
                                                             Geometry="M 1 1 L 1 3 L 3 3 L 3 1 z" />
                                            <GeometryDrawing Brush="{StaticResource ToolBarGripper}"
                                                             Geometry="M 0 0 L 0 2 L 2 2 L 2 0 z" />
                                        </DrawingGroup>
                                    </DrawingBrush.Drawing>
                                </DrawingBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Cursor"
                                    Value="SizeAll" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ToolBarToggleButtonVerticalBackground"
                         EndPoint="1,0"
                         StartPoint="0,0">
        <GradientStop Color="#ECECEC"
                      Offset="0" />
        <GradientStop Color="#DDDDDD"
                      Offset="0.5" />
        <GradientStop Color="#A0A0A0"
                      Offset="1" />
    </LinearGradientBrush>
    <Style x:Key="ToolBarVerticalOverflowButtonStyle"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="Background"
                Value="{StaticResource ToolBarToggleButtonVerticalBackground}" />
        <Setter Property="MinHeight"
                Value="0" />
        <Setter Property="MinWidth"
                Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border SnapsToDevicePixels="true"
                            x:Name="Bd"
                            Background="{TemplateBinding Background}"
                            CornerRadius="0,0,3,3">
                        <Canvas SnapsToDevicePixels="true"
                                HorizontalAlignment="Right"
                                Margin="2,7,2,2"
                                VerticalAlignment="Bottom"
                                Width="7"
                                Height="6">
                            <Path Stroke="White"
                                  Data="M 1.5 1 L 1.5 6" />
                            <Path Stroke="{TemplateBinding Foreground}"
                                  Data="M 0.5 0 L 0.5 5" />
                            <Path Fill="White"
                                  Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" />
                            <Path Fill="{TemplateBinding Foreground}"
                                  Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z" />
                        </Canvas>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{StaticResource ToolBarButtonHover}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{StaticResource ToolBarButtonHover}" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{StaticResource ToolBarGripper}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ToolBarVerticalBackground"
                         EndPoint="1,0"
                         StartPoint="0,0">
        <GradientStop Color="#FFFFFF"
                      Offset="0" />
        <GradientStop Color="#FFFBFF"
                      Offset="0.5" />
        <GradientStop Color="#F7F7F7"
                      Offset="1" />
    </LinearGradientBrush>
    <Style TargetType="{x:Type ToolBar}">
        <Setter Property="Background"
                Value="{StaticResource ToolBarHorizontalBackground}" />
        <Setter Property="BorderBrush"
                Value="#FFB1703C" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToolBar}">
                    <Grid SnapsToDevicePixels="true"
                          Margin="3,1,1,1"
                          x:Name="Grid">
                        <Grid HorizontalAlignment="Right"
                              x:Name="OverflowGrid">
                            <ToggleButton IsEnabled="{TemplateBinding HasOverflowItems}"
                                          FocusVisualStyle="{x:Null}"
                                          x:Name="OverflowButton"
                                          Style="{StaticResource ToolBarHorizontalOverflowButtonStyle}"
                                          ClickMode="Press"
                                          IsChecked="{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                                <ToggleButton.Background>
                                    <LinearGradientBrush EndPoint="0.5,1"
                                                         StartPoint="0.5,0">
                                        <GradientStop Color="#FFFFFFFF"
                                                      Offset="0" />
                                        <GradientStop Color="#FF8AAEDA"
                                                      Offset="0.521" />
                                        <GradientStop Color="#FFC6D6EC"
                                                      Offset="0.194" />
                                        <GradientStop Color="#FFB4C9E5"
                                                      Offset="0.811" />
                                        <GradientStop Color="#FFB7C8E0"
                                                      Offset="0.507" />
                                        <GradientStop Color="#FFD1DEF0"
                                                      Offset="1" />
                                    </LinearGradientBrush>
                                </ToggleButton.Background>
                            </ToggleButton>
                            <Popup Focusable="false"
                                   AllowsTransparency="true"
                                   IsOpen="{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}"
                                   Placement="Bottom"
                                   PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
                                   StaysOpen="False"
                                   x:Name="OverflowPopup">
                                <Border x:Name="Shdw">
                                    <Border BorderThickness="1,1,1,1"
                                            BorderBrush="{TemplateBinding BorderBrush}">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="1.204,0.5"
                                                                 StartPoint="0.056,0.5">
                                                <GradientStop Color="#FFFFFFFF"
                                                              Offset="0" />
                                                <GradientStop Color="#FFD4D7DB"
                                                              Offset="1" />
                                            </LinearGradientBrush>
                                        </Border.Background>
                                        <ToolBarOverflowPanel Focusable="true"
                                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                              FocusVisualStyle="{x:Null}"
                                                              Margin="2"
                                                              x:Name="PART_ToolBarOverflowPanel"
                                                              WrapWidth="200"
                                                              KeyboardNavigation.DirectionalNavigation="Cycle"
                                                              KeyboardNavigation.TabNavigation="Cycle" />
                                    </Border>
                                </Border>
                            </Popup>
                        </Grid>
                        <Border Margin="0,0,11,0"
                                x:Name="MainPanelBorder"
                                BorderThickness="1"
                                CornerRadius="0,0,0,0"
                                Padding="{TemplateBinding Padding}"
                                Background="{DynamicResource NormalBrush}"
                                BorderBrush="{DynamicResource NormalBorderBrush}">
                            <Grid>

                                <DockPanel KeyboardNavigation.TabIndex="1"
                                           KeyboardNavigation.TabNavigation="Local">
                                    <Thumb Padding="6,5,1,6"
                                           Margin="-3,-1,0,0"
                                           x:Name="ToolBarThumb"
                                           Style="{StaticResource ToolBarThumbStyle}"
                                           Width="10" />
                                    <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                      HorizontalAlignment="Center"
                                                      Margin="4,0,4,0"
                                                      x:Name="ToolBarHeader"
                                                      VerticalAlignment="Center"
                                                      ContentSource="Header" />
                                    <ToolBarPanel SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                  Margin="0,1,2,2"
                                                  x:Name="PART_ToolBarPanel"
                                                  IsItemsHost="true"
                                                  Background="{DynamicResource NormalBrush}" />
                                </DockPanel>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsOverflowOpen"
                                 Value="true">
                            <Setter Property="IsEnabled"
                                    TargetName="ToolBarThumb"
                                    Value="false" />
                        </Trigger>
                        <Trigger Property="Header"
                                 Value="{x:Null}">
                            <Setter Property="Visibility"
                                    TargetName="ToolBarHeader"
                                    Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="ToolBarTray.IsLocked"
                                 Value="true">
                            <Setter Property="Visibility"
                                    TargetName="ToolBarThumb"
                                    Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="HasDropShadow"
                                 SourceName="OverflowPopup"
                                 Value="true">
                            <Setter Property="Margin"
                                    TargetName="Shdw"
                                    Value="0,0,5,5" />
                            <Setter Property="SnapsToDevicePixels"
                                    TargetName="Shdw"
                                    Value="true" />
                            <Setter Property="Background"
                                    TargetName="Shdw"
                                    Value="#71000000" />
                        </Trigger>
                        <Trigger Property="Orientation"
                                 Value="Vertical">
                            <Setter Property="Margin"
                                    TargetName="Grid"
                                    Value="1,3,1,1" />
                            <Setter Property="Style"
                                    TargetName="OverflowButton"
                                    Value="{StaticResource ToolBarVerticalOverflowButtonStyle}" />
                            <Setter Property="Height"
                                    TargetName="ToolBarThumb"
                                    Value="10" />
                            <Setter Property="Width"
                                    TargetName="ToolBarThumb"
                                    Value="Auto" />
                            <Setter Property="Margin"
                                    TargetName="ToolBarThumb"
                                    Value="-1,-3,0,0" />
                            <Setter Property="Padding"
                                    TargetName="ToolBarThumb"
                                    Value="5,6,6,1" />
                            <Setter Property="Margin"
                                    TargetName="ToolBarHeader"
                                    Value="0,0,0,4" />
                            <Setter Property="Margin"
                                    TargetName="PART_ToolBarPanel"
                                    Value="1,0,2,2" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ToolBarThumb"
                                    Value="Top" />
                            <Setter Property="DockPanel.Dock"
                                    TargetName="ToolBarHeader"
                                    Value="Top" />
                            <Setter Property="HorizontalAlignment"
                                    TargetName="OverflowGrid"
                                    Value="Stretch" />
                            <Setter Property="VerticalAlignment"
                                    TargetName="OverflowGrid"
                                    Value="Bottom" />
                            <Setter Property="Placement"
                                    TargetName="OverflowPopup"
                                    Value="Right" />
                            <Setter Property="Margin"
                                    TargetName="MainPanelBorder"
                                    Value="0,0,0,11" />
                            <Setter Property="Background"
                                    Value="{StaticResource ToolBarVerticalBackground}" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="#FF000000" />
    </Style>

    <BorderGapMaskConverter x:Key="BorderGapMaskConverter" />
    <Style TargetType="{x:Type GroupBox}">
        <Setter Property="BorderBrush"
                Value="#D5DFE5" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource NuclearButtonFocusVisual}" />
        <Setter Property="Foreground"
                Value="#FF042271" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GroupBox}">
                    <Grid SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="6" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="6" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="6" />
                        </Grid.RowDefinitions>
                        <Border Grid.ColumnSpan="4"
                                Grid.RowSpan="4"
                                CornerRadius="4,4,4,4"
                                BorderThickness="1,1,1,1">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="1.204,0.5"
                                                     StartPoint="0.056,0.5">
                                    <GradientStop Color="#FFFFFFFF"
                                                  Offset="0" />
                                    <GradientStop Color="#FFD4D7DB"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Grid.ColumnSpan="4"
                                Grid.Row="1"
                                Grid.RowSpan="3"
                                BorderThickness="1,1,1,1"
                                CornerRadius="4"
                                BorderBrush="{DynamicResource ControlBorderBrush}">
                            <Border.OpacityMask>
                                <MultiBinding Converter="{StaticResource BorderGapMaskConverter}"
                                              ConverterParameter="7">
                                    <Binding Path="ActualWidth"
                                             ElementName="Header" />
                                    <Binding Path="ActualWidth"
                                             RelativeSource="{RelativeSource Self}" />
                                    <Binding Path="ActualHeight"
                                             RelativeSource="{RelativeSource Self}" />
                                </MultiBinding>
                            </Border.OpacityMask>
                            <Border BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="3">
                                <Border.BorderBrush>
                                    <SolidColorBrush Color="{DynamicResource MainColor}" />
                                </Border.BorderBrush>
                                <Border BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="2">
                                    <Border.BorderBrush>
                                        <SolidColorBrush Color="{DynamicResource MainColor}" />
                                    </Border.BorderBrush>
                                </Border>
                            </Border>
                        </Border>
                        <Border Grid.Column="0"
                                Grid.ColumnSpan="4"
                                Grid.Row="1"
                                Grid.RowSpan="3"
                                Background="{TemplateBinding Background}"
                                BorderBrush="Transparent"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="4" />
                        <Border Grid.ColumnSpan="4"
                                Grid.RowSpan="2"
                                BorderThickness="1,1,1,0"
                                CornerRadius="2,2,0,0"
                                x:Name="Main">
                            <Border x:Name="BackgroundNorm"
                                    BorderThickness="1"
                                    CornerRadius="1.75"
                                    Background="{DynamicResource NormalBrush}"
                                    BorderBrush="{DynamicResource NormalBorderBrush}" />
                        </Border>

                        <Border x:Name="Header"
                                Grid.Column="1"
                                Grid.Row="0"
                                Grid.RowSpan="2"
                                Padding="3,1,3,0">
                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                              ContentSource="Header"
                                              RecognizesAccessKey="True"
                                              Margin="0,4,0,4" />
                        </Border>

                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          Margin="{TemplateBinding Padding}"
                                          Grid.Column="1"
                                          Grid.ColumnSpan="2"
                                          Grid.Row="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}"
           TargetType="{x:Type ScrollViewer}">
        <Setter Property="Focusable"
                Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid SnapsToDevicePixels="true"
                          Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <DockPanel Margin="{TemplateBinding Padding}">
                            <ScrollViewer Focusable="false"
                                          DockPanel.Dock="Top"
                                          HorizontalScrollBarVisibility="Hidden"
                                          VerticalScrollBarVisibility="Hidden">
                                <GridViewHeaderRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                            Margin="2,0,2,0"
                                                            AllowsColumnReorder="{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderContainerStyle="{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderContextMenu="{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderTemplate="{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderTemplateSelector="{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}"
                                                            ColumnHeaderToolTip="{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}"
                                                            Columns="{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}" />

                            </ScrollViewer>
                            <ScrollContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                    x:Name="PART_ScrollContentPresenter"
                                                    Content="{TemplateBinding Content}"
                                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                                    CanContentScroll="{TemplateBinding CanContentScroll}"
                                                    KeyboardNavigation.DirectionalNavigation="Local" />
                        </DockPanel>
                        <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                   Cursor="Arrow"
                                   x:Name="PART_HorizontalScrollBar"
                                   Grid.Row="1"
                                   Orientation="Horizontal"
                                   ViewportSize="{TemplateBinding ViewportWidth}"
                                   Maximum="{TemplateBinding ScrollableWidth}"
                                   Minimum="0.0"
                                   Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                   Cursor="Arrow"
                                   x:Name="PART_VerticalScrollBar"
                                   Grid.Column="1"
                                   Orientation="Vertical"
                                   ViewportSize="{TemplateBinding ViewportHeight}"
                                   Maximum="{TemplateBinding ScrollableHeight}"
                                   Minimum="0.0"
                                   Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <DockPanel Grid.Column="1"
                                   Grid.Row="1"
                                   Background="{Binding Path=Background, ElementName=PART_VerticalScrollBar}"
                                   LastChildFill="false">
                            <Rectangle Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                       Width="1"
                                       Fill="White"
                                       DockPanel.Dock="Left" />
                            <Rectangle Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                       Height="1"
                                       Fill="White"
                                       DockPanel.Dock="Top" />
                        </DockPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ListView}">
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll"
                Value="true" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="BorderBrush"
                Value="#FFB1703C" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Padding"
                Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListView}">
                    <Border x:Name="Border"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="1">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="1.204,0.5"
                                                 StartPoint="0.056,0.5">
                                <GradientStop Color="#FFFFFFFF"
                                              Offset="0" />
                                <GradientStop Color="#FFD4D7DB"
                                              Offset="1" />
                            </LinearGradientBrush>
                        </Border.Background>

                        <ScrollViewer Padding="{TemplateBinding Padding}"
                                      Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsGrouping"
                                 Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll"
                                    Value="false" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ListViewItemFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Stroke="#8E6EA6F5"
                               StrokeThickness="1"
                               RadiusX="2"
                               RadiusY="2" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ListViewItem}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource ListViewItemFocusVisual}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Margin"
                Value="0,0,0,1" />
        <Setter Property="Padding"
                Value="5,2,5,2" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundGradientOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.73" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundGradientOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundGradientSelected"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.84" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundGradientSelectedDisabled"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.55" />
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundGradientSelected"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundGradientSelectedDisabled"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border SnapsToDevicePixels="true"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2"
                            x:Name="border">

                        <Grid Margin="2,0,2,0">
                            <Rectangle x:Name="BackgroundGradientOver"
                                       RadiusX="1"
                                       RadiusY="1"
                                       Stroke="{DynamicResource MouseOverBorderBrush}"
                                       Opacity="0"
                                       Fill="{DynamicResource MouseOverBrush}" />
                            <Rectangle x:Name="BackgroundGradientSelectedDisabled"
                                       RadiusX="1"
                                       RadiusY="1"
                                       Opacity="0"
                                       Fill="{DynamicResource ListItemSelectedBrush}"
                                       Stroke="{DynamicResource ListItemSelectedBorderBrush}" />
                            <Rectangle x:Name="BackgroundGradientSelected"
                                       StrokeThickness="1"
                                       RadiusX="1"
                                       RadiusY="1"
                                       Opacity="0"
                                       Fill="{DynamicResource PressedBrush}"
                                       Stroke="{DynamicResource PressedBorderBrush}" />
                            <GridViewRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                  Margin="0,2,0,2"
                                                  VerticalAlignment="Stretch" />
                        </Grid>

                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOff}"
                                                 x:Name="SelectedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource SelectedOn}"
                                                 x:Name="SelectedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>

                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="true" />
                                <Condition Property="Selector.IsSelectionActive"
                                           Value="false" />
                            </MultiTrigger.Conditions>

                        </MultiTrigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{DynamicResource OutsideFontColor}" />
    </Style>

    <Style x:Key="GridViewColumnHeaderGripper"
           TargetType="{x:Type Thumb}">
        <Setter Property="Canvas.Right"
                Value="-8.5" />
        <Setter Property="Width"
                Value="18" />
        <Setter Property="Height"
                Value="{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}" />
        <Setter Property="Padding"
                Value="0,3,0,4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Padding="{TemplateBinding Padding}"
                            Background="#00FFFFFF">
                        <Rectangle HorizontalAlignment="Center"
                                   Width="0.5">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                            </Rectangle.Fill>
                        </Rectangle>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Type GridViewColumnHeader}"
           TargetType="{x:Type GridViewColumnHeader}">
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Padding"
                Value="2,0,2,0" />
        <Setter Property="Foreground"
                Value="#FF042271" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Padding"
                Value="3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundOver_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.65" />
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundOver_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundPressed"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.84" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgoundPressed_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.65" />
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundPressed"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgoundPressed_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid Margin="0,1,0,1">
                        <Grid>

                            <Border x:Name="BackgroundNorm"
                                    BorderThickness="1"
                                    CornerRadius="1.75"
                                    Background="{DynamicResource NormalBrush}"
                                    BorderBrush="{DynamicResource NormalBorderBrush}" />
                            <Border x:Name="BackgroundNorm_highlight"
                                    Margin="1"
                                    BorderBrush="{DynamicResource NormalHighlightBrush}"
                                    BorderThickness="1,0,1,1"
                                    CornerRadius="1"
                                    Opacity="0.65" />
                            <Border x:Name="BackgroundOver"
                                    BorderThickness="1"
                                    CornerRadius="1.75"
                                    Opacity="0"
                                    Background="{DynamicResource MouseOverBrush}"
                                    BorderBrush="{DynamicResource MouseOverBorderBrush}" />
                            <Border x:Name="BackgroundOver_Highlight"
                                    Margin="1"
                                    BorderThickness="1,0,1,1"
                                    CornerRadius="1"
                                    Opacity="0"
                                    BorderBrush="{DynamicResource MouseOverHighlightBrush}" />
                            <Border x:Name="BackgroundPressed"
                                    BorderThickness="1"
                                    CornerRadius="1.75"
                                    Opacity="0"
                                    Background="{DynamicResource PressedBrush}"
                                    BorderBrush="{DynamicResource PressedBorderBrush}" />
                            <Border x:Name="BackgoundPressed_Highlight"
                                    Margin="1"
                                    BorderThickness="1,0,1,1"
                                    CornerRadius="1"
                                    Opacity="0"
                                    BorderBrush="{DynamicResource PressedHighlightBrush}" />
                            <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              RecognizesAccessKey="True"
                                              Margin="2,2,2,2" />
                        </Grid>
                        <Canvas>
                            <Thumb x:Name="PART_HeaderGripper"
                                   Style="{StaticResource GridViewColumnHeaderGripper}"
                                   HorizontalAlignment="Stretch" />
                        </Canvas>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="Height"
                                 Value="Auto">
                            <Setter Property="MinHeight"
                                    Value="20" />
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="Role"
                                 Value="Padding">
                            <Setter TargetName="PART_HeaderGripper"
                                    Property="Visibility"
                                    Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="Role"
                                 Value="Floating">
                            <Setter TargetName="PART_HeaderGripper"
                                    Property="Visibility"
                                    Value="Collapsed" />
                            <Setter Property="Background"
                                    Value="Yellow" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ToggleButton}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource NuclearButtonFocusVisual}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Foreground"
                Value="{DynamicResource OutsideFontColor}" />
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Padding"
                Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="1" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundOver_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.65" />

                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundOver"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundOver_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />

                        </Storyboard>
                        <Storyboard x:Key="CheckedOn">
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgroundChecked"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.84" />
                            <DoubleAnimation Duration="00:00:00.1000000"
                                             Storyboard.TargetName="BackgoundChecked_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.65" />
                        </Storyboard>
                        <Storyboard x:Key="CheckedOff">
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgroundChecked"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.4000000"
                                             Storyboard.TargetName="BackgoundChecked_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>

                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimation Duration="00:00:00.0010000"
                                             Storyboard.TargetName="BackgroundPressed"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.84" />
                            <DoubleAnimation Duration="00:00:00.0010000"
                                             Storyboard.TargetName="BackgoundPressed_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0.65" />
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimation Duration="00:00:00.0010000"
                                             Storyboard.TargetName="BackgroundPressed"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                            <DoubleAnimation Duration="00:00:00.0010000"
                                             Storyboard.TargetName="BackgoundPressed_Highlight"
                                             Storyboard.TargetProperty="Opacity"
                                             To="0" />
                        </Storyboard>
                        <Storyboard x:Key="FocusedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                      Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="FocusedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                           Storyboard.TargetName="FocusVisualElement"
                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                                      Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>

                    </ControlTemplate.Resources>
                    <Grid x:Name="grid1">
                        <Border x:Name="BackgroundNorm"
                                BorderThickness="1"
                                CornerRadius="1.75"
                                Background="{DynamicResource NormalBrush}"
                                BorderBrush="{DynamicResource NormalBorderBrush}" />
                        <Border x:Name="BackgroundNorm_highlight"
                                Margin="1"
                                BorderBrush="{DynamicResource NormalHighlightBrush}"
                                BorderThickness="1,0,1,1"
                                CornerRadius="1"
                                Opacity="0.65" />
                        <Border x:Name="BackgroundChecked"
                                BorderThickness="1"
                                CornerRadius="1.75"
                                Opacity="0"
                                Background="{DynamicResource PressedBrush}"
                                BorderBrush="{DynamicResource PressedBorderBrush}" />
                        <Border x:Name="BackgoundChecked_Highlight"
                                Margin="1"
                                BorderThickness="1,0,1,1"
                                CornerRadius="1"
                                Opacity="0"
                                BorderBrush="{DynamicResource PressedHighlightBrush}" />
                        <Border x:Name="BackgroundOver"
                                BorderThickness="1"
                                CornerRadius="1.75"
                                Opacity="0"
                                Background="{DynamicResource MouseOverBrush}"
                                BorderBrush="{DynamicResource MouseOverBorderBrush}" />
                        <Border x:Name="BackgroundOver_Highlight"
                                Margin="1"
                                BorderThickness="1,0,1,1"
                                CornerRadius="1"
                                Opacity="0"
                                BorderBrush="{DynamicResource MouseOverHighlightBrush}" />
                        <Border x:Name="BackgroundPressed"
                                BorderThickness="1"
                                CornerRadius="1.75"
                                Opacity="0"
                                Background="{DynamicResource PressedBrush}"
                                BorderBrush="{DynamicResource PressedBorderBrush}" />
                        <Border x:Name="BackgoundPressed_Highlight"
                                Margin="1"
                                BorderThickness="1,0,1,1"
                                CornerRadius="1"
                                Opacity="0"
                                BorderBrush="{DynamicResource PressedHighlightBrush}" />
                        <Border x:Name="DisabledVisualElement"
                                IsHitTestVisible="false"
                                Background="{DynamicResource DisabledBackgroundBrush}"
                                BorderBrush="{DynamicResource DisabledBorderBrush}"
                                BorderThickness="1"
                                Opacity="0" />
                        <ContentPresenter x:Name="contentPresenter"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Margin="{TemplateBinding Padding}" />
                        <TextBlock Panel.ZIndex="1"
                                   x:Name="DisabledOverlay"
                                   Text="{TemplateBinding Content}"
                                   Foreground="#FF8E96A2"
                                   HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                   VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                   Margin="{TemplateBinding Padding}"
                                   Visibility="Collapsed" />
                        <Border x:Name="FocusVisualElement"
                                Margin="-1"
                                Grid.RowSpan="2"
                                BorderBrush="{DynamicResource FocusBrush}"
                                BorderThickness="1"
                                CornerRadius="2.75"
                                IsHitTestVisible="false"
                                Opacity="0" />
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                                 x:Name="HoverOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsPressed"
                                 Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}"
                                                 x:Name="PressedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}"
                                                 x:Name="PressedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                                 x:Name="FocusedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                                 x:Name="FocusedOn_BeginStoryboard" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsChecked"
                                 Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOff}"
                                                 x:Name="CheckedOff_BeginStoryboard" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource CheckedOn}"
                                                 x:Name="CheckedOn_BeginStoryboard" />
                            </Trigger.EnterActions>

                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="#ADADAD" />
                            <Setter Property="Visibility"
                                    TargetName="DisabledVisualElement"
                                    Value="Visible" />
                            <Setter Property="Visibility"
                                    TargetName="DisabledOverlay"
                                    Value="Visible" />
                            <Setter Property="Visibility"
                                    TargetName="contentPresenter"
                                    Value="Collapsed" />
                            <Setter Property="Opacity"
                                    TargetName="DisabledVisualElement"
                                    Value="1" />

                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="ToolTip">
        <Setter Property="Background"
                Value="#33000000" />
        <Setter Property="FontFamily"
                Value="Trebuchet MS" />
        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Padding"
                Value="3,0,3,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Border x:Name="Root"
                            Background="{TemplateBinding Background}"
                            BorderBrush="#19000000"
                            CornerRadius="3">
                        <Border Margin="-3,-3,3,3"
                                BorderBrush="#FF767676"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3"
                                Padding="4">
                            <Border.Resources>
                                <Storyboard x:Key="Visible State" />
                                <Storyboard x:Key="Normal State" />
                            </Border.Resources>
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1"
                                                     StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFFFFF"
                                                  Offset="0.004" />
                                    <GradientStop Color="#FFCDDCF0"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <ContentPresenter Content="{TemplateBinding Content}"
                                              ContentTemplate="{TemplateBinding ContentTemplate}"
                                              Cursor="{TemplateBinding Cursor}"
                                              Margin="{TemplateBinding Padding}" />
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
